Class: NPR::Message
- Inherits:
-
Object
- Object
- NPR::Message
- Defined in:
- lib/rubynpr/message.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#message_id ⇒ Object
Returns the value of attribute message_id.
-
#raw_message ⇒ Object
Returns the value of attribute raw_message.
Instance Method Summary collapse
-
#initialize(message_id, body, raw_message) ⇒ Message
constructor
A new instance of Message.
- #to_s ⇒ Object
Constructor Details
#initialize(message_id, body, raw_message) ⇒ Message
Returns a new instance of Message.
5 6 7 |
# File 'lib/rubynpr/message.rb', line 5 def initialize(, body, ) @body, @message_id, @raw_message = body, , end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
3 4 5 |
# File 'lib/rubynpr/message.rb', line 3 def body @body end |
#message_id ⇒ Object
Returns the value of attribute message_id.
3 4 5 |
# File 'lib/rubynpr/message.rb', line 3 def @message_id end |
#raw_message ⇒ Object
Returns the value of attribute raw_message.
3 4 5 |
# File 'lib/rubynpr/message.rb', line 3 def @raw_message end |
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'lib/rubynpr/message.rb', line 9 def to_s "#{ self.class } (#{ }): #{ @body }" end |