Skip to content

Instantly share code, notes, and snippets.

@dannyc5
Created April 20, 2017 15:27
Show Gist options
  • Save dannyc5/aa05e6380f670426384717361864fb80 to your computer and use it in GitHub Desktop.
Save dannyc5/aa05e6380f670426384717361864fb80 to your computer and use it in GitHub Desktop.
module B
def bee
p cee
end
end
module C
def cee
'hi'
end
end
class A
include B
include C
def hay
bee
end
end
a = A.new
a.hay # self is a, and all mixed-in methods are visible to a (in a's scope)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment