Created
June 24, 2009 14:45
-
-
Save DimaD/135308 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
#/!usr/bin/env ruby | |
module First | |
def save(*args) | |
puts "First#save, args are #{args.inspect}" | |
end | |
end | |
module Second | |
def save(*args) | |
puts "Second#save, args are #{args.inspect}" | |
super | |
end | |
end | |
module Third | |
def save(*args) | |
puts "Third#save, args are #{args.inspect}" | |
super | |
end | |
end | |
module Fourth | |
def save(*args) | |
puts "Fourth#save, args are #{args.inspect}" | |
super | |
end | |
end | |
class Caller | |
include First | |
include Second | |
include Third | |
include Fourth | |
def save(*args) | |
puts "Caller#save, args are #{args.inspect}" | |
super | |
end | |
end | |
c = Caller.new | |
c.save(123123, 432) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment