-
-
Save anonymous/020dc114301d9dcb4f53 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 TestParent | |
class Library | |
def name | |
"Oxford" | |
end | |
end | |
class Book | |
def library | |
Library.new | |
end | |
end | |
end | |
module Child | |
class Library < TestParent::Library | |
def name | |
"Child Library" | |
end | |
end | |
class Book < TestParent::Book | |
# any way to avoid having to recreate the method to reset the class scope? | |
def library | |
Library.new | |
end | |
end | |
end |
mwlang
commented
Sep 24, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment