Created
April 28, 2009 08:32
-
-
Save kirel/103025 to your computer and use it in GitHub Desktop.
This file contains 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
class Foo | |
def foo | |
puts "parent" | |
end | |
end | |
class Foobar < Foo | |
def foo | |
puts "child" | |
super | |
end | |
end | |
module Bar | |
def foo | |
puts "module" | |
super | |
end | |
end | |
Foobar.new.extend(Bar).foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment