Skip to content

Instantly share code, notes, and snippets.

@stevenbristol
Created August 6, 2012 14:00
Show Gist options
  • Save stevenbristol/3274638 to your computer and use it in GitHub Desktop.
Save stevenbristol/3274638 to your computer and use it in GitHub Desktop.
typical module setup
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