Method: Celluloid::ClassMethods#new_link
- Defined in:
- lib/celluloid.rb
#new_link(*args, &block) ⇒ Object Also known as: spawn_link
Create a new actor and link to the current one
205 206 207 208 209 210 211 212 |
# File 'lib/celluloid.rb', line 205 def new_link(*args, &block) raise NotActorError, "can't link outside actor context" unless Celluloid.actor? proxy = Cell.new(allocate, , ).proxy Actor.link(proxy) proxy._send_(:initialize, *args, &block) proxy end |