Skip to content

Instantly share code, notes, and snippets.

@iande
Created June 5, 2011 21:21
Show Gist options
  • Save iande/1009433 to your computer and use it in GitHub Desktop.
Save iande/1009433 to your computer and use it in GitHub Desktop.
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