Created
May 25, 2012 08:37
-
-
Save bluerabbit/2786657 to your computer and use it in GitHub Desktop.
Rubyでmoduleを作る場合はActiveSupport::Concernをextendする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module M | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def cm; puts 'I am a class method'; end | |
end | |
module InstanceMethods | |
def im; puts 'I am an instance method'; end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment