Skip to content

Instantly share code, notes, and snippets.

@jish
Created June 9, 2011 23:24
Show Gist options
  • Select an option

  • Save jish/1017985 to your computer and use it in GitHub Desktop.

Select an option

Save jish/1017985 to your computer and use it in GitHub Desktop.
Multi include
module One
def method
"one"
end
end
module Two
def method
"two"
end
end
class Foo
include One
include Two
end
puts Foo.new.method # => "two"
class Bar
include One
include Two
def method
"bar"
end
end
puts Bar.new.method # => "bar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment