Created
August 10, 2012 22:42
-
-
Save westonplatter/3318683 to your computer and use it in GitHub Desktop.
namespace_ops
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
# want to see module/classes referenced via symbols. | |
# put this into IRB | |
module M # Main is 3 keys longer than M | |
class A | |
def test | |
"a" | |
end | |
end | |
class B < A | |
def other | |
"b" | |
end | |
end | |
end | |
M::A.class_eval do | |
def self.more | |
"more" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment