Skip to content

Instantly share code, notes, and snippets.

@mlomnicki
Created April 19, 2010 15:27
Show Gist options
  • Select an option

  • Save mlomnicki/371157 to your computer and use it in GitHub Desktop.

Select an option

Save mlomnicki/371157 to your computer and use it in GitHub Desktop.
Modules order
module ModOne
def hello
"hello1"
end
end
module ModTwo
def hello
"hello2"
end
end
class Foo
include ModOne, ModTwo
end
class Bar
include ModOne
include ModTwo
end
puts Foo.new.hello # => hello1
puts Bar.new.hello # => hello2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment