Class: CrystalMQ::MessagePayload
- Inherits:
-
Object
- Object
- CrystalMQ::MessagePayload
- Defined in:
- lib/crystalmq.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message) ⇒ MessagePayload
constructor
A new instance of MessagePayload.
- #to_msgpack ⇒ Object
Constructor Details
#initialize(message) ⇒ MessagePayload
Returns a new instance of MessagePayload.
8 9 10 |
# File 'lib/crystalmq.rb', line 8 def initialize() = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/crystalmq.rb', line 6 def end |
Class Method Details
.from_msgpack(h) ⇒ Object
16 17 18 |
# File 'lib/crystalmq.rb', line 16 def self.from_msgpack h MessagePayload.new(h["message"]) end |
Instance Method Details
#to_msgpack ⇒ Object
12 13 14 |
# File 'lib/crystalmq.rb', line 12 def to_msgpack { "message" => }.to_msgpack end |