Class: IncomingMessage
- Inherits:
-
Object
- Object
- IncomingMessage
- Defined in:
- lib/ulms_client.rb
Instance Attribute Summary collapse
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
Instance Method Summary collapse
-
#[](key) ⇒ Object
A shortcut for payload fields.
-
#initialize(topic, payload, properties) ⇒ IncomingMessage
constructor
A new instance of IncomingMessage.
Constructor Details
#initialize(topic, payload, properties) ⇒ IncomingMessage
Returns a new instance of IncomingMessage.
171 172 173 174 175 |
# File 'lib/ulms_client.rb', line 171 def initialize(topic, payload, properties) @topic = topic @payload = payload @properties = properties end |
Instance Attribute Details
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
169 170 171 |
# File 'lib/ulms_client.rb', line 169 def payload @payload end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
169 170 171 |
# File 'lib/ulms_client.rb', line 169 def properties @properties end |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
169 170 171 |
# File 'lib/ulms_client.rb', line 169 def topic @topic end |
Instance Method Details
#[](key) ⇒ Object
A shortcut for payload fields. ‘msg` is the same as `msg.payload`.
178 179 180 |
# File 'lib/ulms_client.rb', line 178 def [](key) @payload[key] end |