Skip to content

Instantly share code, notes, and snippets.

@jcalvert
Created March 13, 2012 18:24
Show Gist options
  • Save jcalvert/2030477 to your computer and use it in GitHub Desktop.
Save jcalvert/2030477 to your computer and use it in GitHub Desktop.
multi
module Multiball
module Multicaster
def multi_method(proxied_thing, *args)
args.each do |method|
define_method method do |*method_args|
Multiball.servers.values.each{|value| value.send(proxied_thing).send method, method_args}
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment