Created
September 21, 2010 17:14
-
-
Save tomafro/590064 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
module A | |
def example | |
puts "A" | |
super rescue nil | |
end | |
end | |
module B | |
def example | |
puts "B" | |
super rescue nil | |
end | |
end | |
module C | |
def example | |
puts "C" | |
super rescue nil | |
end | |
end | |
class SingleLine | |
include A, B, C | |
end | |
puts "SingleLine: " | |
SingleLine.new.example | |
class ManyLines | |
include A | |
include B | |
include C | |
end | |
puts | |
puts "ManyLines: " | |
ManyLines.new.example |
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
SingleLine: | |
A | |
B | |
C | |
ManyLines: | |
C | |
B | |
A |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment