Created
February 25, 2013 06:33
-
-
Save sonots/5028147 to your computer and use it in GitHub Desktop.
how to write this with Module#prepend? I mean, how to call #moge2_without_hoge from #moge1_without_hoge with Module#prepend?
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 Hoge < Moge | |
def moge1_with_hoge | |
moge1_without_hoge | |
moge2_without_hoge | |
end | |
alias_method_chain :moge1, :hoge | |
def moge2_with_hoge | |
moge2_without_hoge | |
end | |
alias_method_chain :moge2, :hoge | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment