Skip to content

Instantly share code, notes, and snippets.

@practicingruby
Created February 13, 2013 12:39
Show Gist options
  • Select an option

  • Save practicingruby/4944345 to your computer and use it in GitHub Desktop.

Select an option

Save practicingruby/4944345 to your computer and use it in GitHub Desktop.
module A
def foo
puts "FROM A!"
a
b
c
end
private
def a
puts "a"
end
end
module B
def bar
puts "FROM B!"
a
b
c
end
private
def b
puts "b"
end
end
module C
def baz
puts "FROM C!"
a
b
c
end
private
def c
puts "c"
end
end
class D
include A
include B
include C
def quux
foo
bar
baz
end
end
D.new.quux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment