Created
August 29, 2010 01:11
-
-
Save metaskills/555796 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Foo | |
def foo | |
'foo' | |
end | |
end | |
module FooWithBar | |
def foo | |
"bar #{super}" | |
end | |
end | |
module FooWithBatz | |
def foo | |
"batz #{super}" | |
end | |
end | |
class Base | |
include Foo | |
include FooWithBar | |
include FooWithBatz | |
end | |
o = Base.new | |
o.foo # => "batz bar foo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment