Skip to content

Instantly share code, notes, and snippets.

@tadman
Created April 23, 2009 17:20
Show Gist options
  • Save tadman/100612 to your computer and use it in GitHub Desktop.
Save tadman/100612 to your computer and use it in GitHub Desktop.
class Multiplexer
instance_methods.each do |m|
undef_method m unless(m.match(/^__/))
end
def initialize(*objects)
@objects = objects
end
def method_missing(m, *args)
@objects.each do |o|
o.send(m, *args)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment