diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2014-02-23 12:06:18 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2014-02-23 12:06:23 -0700 |
commit | b16c36e688970df2f96f793a759365b248b582ad (patch) | |
tree | cf8f4e85a6ee1a4aab0caca6c70d843fbc852b57 /activesupport/lib/active_support/core_ext/kernel/concern.rb | |
parent | 96759cf6c6a17053abb6a2b7cd87cdbd5a8420ba (diff) | |
download | rails-b16c36e688970df2f96f793a759365b248b582ad.tar.gz rails-b16c36e688970df2f96f793a759365b248b582ad.tar.bz2 rails-b16c36e688970df2f96f793a759365b248b582ad.zip |
Introduce Concern#class_methods and Kernel#concern
Diffstat (limited to 'activesupport/lib/active_support/core_ext/kernel/concern.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/kernel/concern.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/kernel/concern.rb b/activesupport/lib/active_support/core_ext/kernel/concern.rb new file mode 100644 index 0000000000..c200a78d36 --- /dev/null +++ b/activesupport/lib/active_support/core_ext/kernel/concern.rb @@ -0,0 +1,10 @@ +require 'active_support/core_ext/module/concerning' + +module Kernel + # A shortcut to define a toplevel concern, not within a module. + # + # See ActiveSupport::CoreExt::Module::Concerning for more. + def concern(topic, &module_definition) + Object.concern topic, &module_definition + end +end |