Created
June 5, 2011 21:21
-
-
Save iande/1009433 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
class Message | |
class << self | |
def some_meth; "Hello from Message"; end | |
end | |
end | |
class Version < Message | |
class << self | |
def some_meth; "Hello from Version"; end | |
end | |
end | |
class AltMessage < Message | |
end | |
Message.some_meth # => "Hello from Message" | |
Version.some_meth # => "Hello from Version" | |
AltMessage.some_meth # => "Hello from Message' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment