Skip to content

Instantly share code, notes, and snippets.

@DimaD
Created June 24, 2009 14:45
Show Gist options
  • Save DimaD/135308 to your computer and use it in GitHub Desktop.
Save DimaD/135308 to your computer and use it in GitHub Desktop.
#/!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