Created
April 14, 2011 20:39
-
-
Save jrochkind/920478 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 Namespace | |
module Original | |
def print_something | |
"foo" | |
end | |
end | |
end | |
module OtherNameSpace | |
module Dependent | |
include Namespace::Original | |
def call_print_something | |
print_something | |
end | |
end | |
end | |
class Thing | |
include OtherNameSpace::Dependent | |
def print_something | |
"Thing!" | |
end | |
end | |
puts Thing.new.call_print_something | |
# prints "Thing!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment