Class: IncomingMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/ulms_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(topic, payload, properties) ⇒ IncomingMessage

Returns a new instance of IncomingMessage.



165
166
167
168
169
# File 'lib/ulms_client.rb', line 165

def initialize(topic, payload, properties)
  @topic = topic
  @payload = payload
  @properties = properties
end

Instance Attribute Details

#payloadObject (readonly)

Returns the value of attribute payload.



163
164
165
# File 'lib/ulms_client.rb', line 163

def payload
  @payload
end

#propertiesObject (readonly)

Returns the value of attribute properties.



163
164
165
# File 'lib/ulms_client.rb', line 163

def properties
  @properties
end

#topicObject (readonly)

Returns the value of attribute topic.



163
164
165
# File 'lib/ulms_client.rb', line 163

def topic
  @topic
end

Instance Method Details

#[](key) ⇒ Object

A shortcut for payload fields. ‘msg` is the same as `msg.payload`.



172
173
174
# File 'lib/ulms_client.rb', line 172

def [](key)
  @payload[key]
end