Class: NatsListener::Message
- Inherits:
-
Object
- Object
- NatsListener::Message
- Defined in:
- lib/nats_listener/message.rb
Overview
Message class offered to be used with json serialization
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(data) ⇒ Message
constructor
A new instance of Message.
- #to_json ⇒ Object
Constructor Details
#initialize(data) ⇒ Message
Returns a new instance of Message.
8 9 10 |
# File 'lib/nats_listener/message.rb', line 8 def initialize(data) @message = (data) end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/nats_listener/message.rb', line 6 def @message end |
Instance Method Details
#to_json ⇒ Object
12 13 14 |
# File 'lib/nats_listener/message.rb', line 12 def to_json .to_json end |