module Module::Concerning

def concern(topic, &module_definition)

end
...

extend ActiveSupport::Concern
module EventTracking

is equivalent to

end
...
concern :EventTracking do

A low-cruft shortcut to define a concern.
def concern(topic, &module_definition)
  const_set topic, Module.new {
    extend ::ActiveSupport::Concern
    module_eval(&module_definition)
  }
end

def concerning(topic, prepend: false, &block)

Define a new concern and mix it in.
def concerning(topic, prepend: false, &block)
  method = prepend ? :prepend : :include
  __send__(method, concern(topic, &block))
end