Method: Celluloid::ClassMethods#new_link

Defined in:
lib/celluloid.rb

Create a new actor and link to the current one

Raises:



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, behavior_options, actor_options).proxy
  Actor.link(proxy)
  proxy._send_(:initialize, *args, &block)
  proxy
end