Created
July 27, 2012 05:22
-
-
Save mitchellh/3186297 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Mixin | |
def self.included(base) | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
def foo | |
puts "HELLO!" | |
end | |
end | |
end | |
class Foo | |
include Mixin | |
end | |
Foo.foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment