module Module::Concerning
def concern(topic, &module_definition)
...
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)
def concerning(topic, prepend: false, &block) method = prepend ? :prepend : :include __send__(method, concern(topic, &block)) end