Skip to content

Instantly share code, notes, and snippets.

@lmduc
Last active May 28, 2019 07:29
Show Gist options
  • Save lmduc/3ab85576d7021228c4b4eaabe1de3ba6 to your computer and use it in GitHub Desktop.
Save lmduc/3ab85576d7021228c4b4eaabe1de3ba6 to your computer and use it in GitHub Desktop.
test method chain ruby
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