class Message

Base Message class. Child classes should call super from initialize and must implement process.

Attributes

message[R]

(Mostly) Common message attributes

Public Class Methods

new(message) click to toggle source

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

# File lib/test_driven_lighting/messages/message.rb, line 11
def initialize message
  @message = message
end

Public Instance Methods

message_type() click to toggle source
# File lib/test_driven_lighting/messages/message.rb, line 15
def message_type
  message.fetch 'message_type'
end