Class: Message
- Inherits:
-
Object
- Object
- Message
- Defined in:
- lib/test_driven_lighting/messages/message.rb
Overview
Base Message class. Child classes should call super from #initialize and must implement #process.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
(Mostly) Common message attributes.
Instance Method Summary collapse
-
#initialize(message) ⇒ Message
constructor
message: hash with string keys containing the message data.
- #message_type ⇒ Object
Constructor Details
#initialize(message) ⇒ Message
message: hash with string keys containing the message data. MUST contain at least “message_type” => “name_of_this_message” so we know which message class should handle it, though technically that’s all handled by MessageDispatcher before we ever construct the message
11 12 13 |
# File 'lib/test_driven_lighting/messages/message.rb', line 11 def initialize = end |
Instance Attribute Details
#message ⇒ Object (readonly)
(Mostly) Common message attributes
5 6 7 |
# File 'lib/test_driven_lighting/messages/message.rb', line 5 def end |
Instance Method Details
#message_type ⇒ Object
15 16 17 |
# File 'lib/test_driven_lighting/messages/message.rb', line 15 def .fetch 'message_type' end |