Class: Celluloid::LinkingRequest
- Inherits:
-
SystemEvent::LinkingEvent
- Object
- SystemEvent
- SystemEvent::LinkingEvent
- Celluloid::LinkingRequest
- Defined in:
- lib/celluloid/system_events.rb
Overview
Request to link with another actor
Instance Attribute Summary collapse
-
#actor ⇒ Object
readonly
Returns the value of attribute actor.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
Methods inherited from SystemEvent::LinkingEvent
Methods inherited from SystemEvent
Constructor Details
This class inherits a constructor from Celluloid::SystemEvent::LinkingEvent
Instance Attribute Details
#actor ⇒ Object (readonly)
Returns the value of attribute actor.
51 52 53 |
# File 'lib/celluloid/system_events.rb', line 51 def actor @actor end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
51 52 53 |
# File 'lib/celluloid/system_events.rb', line 51 def type @type end |
Instance Method Details
#process(links) ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'lib/celluloid/system_events.rb', line 57 def process(links) case type when :link then links << actor when :unlink then links.delete actor end actor.mailbox << LinkingResponse.new(Actor.current, type) end |