Skip to content

Instantly share code, notes, and snippets.

@shawn42
Created November 23, 2009 16:23
Show Gist options
  • Save shawn42/241150 to your computer and use it in GitHub Desktop.
Save shawn42/241150 to your computer and use it in GitHub Desktop.
class MeteorManager < Actor
def setup
@meteors = []
count = @opts[:count]
count.times do
@meteors << spawn :meteor
end
end
def method_missing(it,*args)
@meteors.each do |m|
m.send it, *args
end
end
end
man = spawn :meteor_manager, :count => 40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment