Created
June 14, 2010 21:44
-
-
Save brianc/438359 to your computer and use it in GitHub Desktop.
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 Awesomeness | |
module ClassMethods | |
def hello | |
puts "YAY" | |
end | |
end | |
def hello | |
puts "hi" | |
end | |
def self.included(klass) | |
class << klass | |
include Awesomeness::ClassMethods | |
end | |
end | |
end | |
class Person | |
include Awesomeness | |
end | |
Person.hello | |
Person.new.hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment