Created
March 13, 2012 18:24
-
-
Save jcalvert/2030477 to your computer and use it in GitHub Desktop.
multi
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 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