Module: Concurrent::Actor::InternalDelegations

Includes:
PublicDelegations
Included in:
AbstractContext, Behaviour::Abstract
Defined in:
lib/concurrent/actor/internal_delegations.rb

Instance Method Summary collapse

Methods included from PublicDelegations

#context_class, #executor, #name, #parent, #path, #reference

Instance Method Details

#behaviour(behaviour_class) ⇒ Object

see Core#behaviour



38
39
40
# File 'lib/concurrent/actor/internal_delegations.rb', line 38

def behaviour(behaviour_class)
  core.behaviour(behaviour_class)
end

#behaviour!(behaviour_class) ⇒ Object

see Core#behaviour!



43
44
45
# File 'lib/concurrent/actor/internal_delegations.rb', line 43

def behaviour!(behaviour_class)
  core.behaviour!(behaviour_class)
end

#childrenObject

See Also:



7
8
9
# File 'lib/concurrent/actor/internal_delegations.rb', line 7

def children
  core.children
end

#contextAbstractContext

Returns:



33
34
35
# File 'lib/concurrent/actor/internal_delegations.rb', line 33

def context
  core.context
end

#dead_letter_routingObject



23
24
25
# File 'lib/concurrent/actor/internal_delegations.rb', line 23

def dead_letter_routing
  context.dead_letter_routing
end

#log(level, message = nil, &block) ⇒ Object

delegates to core.log

See Also:



18
19
20
# File 'lib/concurrent/actor/internal_delegations.rb', line 18

def log(level, message = nil, &block)
  core.log(level, message, &block)
end

#redirect(reference, envelope = self.envelope) ⇒ Object



27
28
29
30
# File 'lib/concurrent/actor/internal_delegations.rb', line 27

def redirect(reference, envelope = self.envelope)
  reference.message(envelope.message, envelope.ivar)
  Behaviour::MESSAGE_PROCESSED
end

#terminate!Object

See Also:

  • Core#terminate!


12
13
14
# File 'lib/concurrent/actor/internal_delegations.rb', line 12

def terminate!
  behaviour!(Behaviour::Termination).terminate!
end