Last active
May 28, 2019 07:29
-
-
Save lmduc/3ab85576d7021228c4b4eaabe1de3ba6 to your computer and use it in GitHub Desktop.
test method chain ruby
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
module A | |
def say | |
p "in A" | |
end | |
end | |
module B | |
include A | |
def say | |
p "in B" | |
end | |
end | |
module C | |
def say | |
p "in C" | |
end | |
end | |
class E | |
include A | |
def say | |
p "in E" | |
end | |
end | |
class D < E | |
include B | |
include C | |
def say | |
p "in D" | |
end | |
end | |
D.new.say |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment