Created
August 6, 2012 14:00
-
-
Save stevenbristol/3274638 to your computer and use it in GitHub Desktop.
typical module setup
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 Mod | |
module ClassMethods | |
#put class methods here | |
end | |
module InstanceMethods | |
#put instnace methods here | |
end | |
def self.included(receiver) | |
receiver.extend ClassMethods | |
receiver.send :include, InstanceMethods | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment