Class: DCell::Message::SystemEvent
- Inherits:
-
DCell::Message
- Object
- DCell::Message
- DCell::Message::SystemEvent
- Defined in:
- lib/dcell/messages.rb
Overview
Send a system event to the given recipient
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#recipient ⇒ Object
readonly
Returns the value of attribute recipient.
Attributes inherited from DCell::Message
Instance Method Summary collapse
- #dispatch ⇒ Object
-
#initialize(recipient, event) ⇒ SystemEvent
constructor
A new instance of SystemEvent.
Constructor Details
#initialize(recipient, event) ⇒ SystemEvent
Returns a new instance of SystemEvent.
69 70 71 72 |
# File 'lib/dcell/messages.rb', line 69 def initialize(recipient, event) super() @recipient, @event = recipient, event end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
67 68 69 |
# File 'lib/dcell/messages.rb', line 67 def event @event end |
#recipient ⇒ Object (readonly)
Returns the value of attribute recipient.
67 68 69 |
# File 'lib/dcell/messages.rb', line 67 def recipient @recipient end |
Instance Method Details
#dispatch ⇒ Object
74 75 76 |
# File 'lib/dcell/messages.rb', line 74 def dispatch DCell::Router.route_system_event @recipient, @event end |