Class: Jungle::SQSMessage
- Inherits:
-
Object
- Object
- Jungle::SQSMessage
- Defined in:
- lib/jungle/client.rb
Overview
Contains a message that has been received from a queue.
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#id ⇒ Object
Returns the value of attribute id.
-
#queue_path ⇒ Object
Returns the value of attribute queue_path.
Instance Method Summary collapse
-
#initialize(queue_path, xml) ⇒ SQSMessage
constructor
A new instance of SQSMessage.
- #inspect ⇒ Object
Constructor Details
#initialize(queue_path, xml) ⇒ SQSMessage
Returns a new instance of SQSMessage.
483 484 485 486 |
# File 'lib/jungle/client.rb', line 483 def initialize(queue_path, xml) @queue_path = queue_path m, @id, @body = *xml.match(/<MessageId>(.*?)<\/MessageId><MessageBody>(.*?)<\/MessageBody>/m) end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
481 482 483 |
# File 'lib/jungle/client.rb', line 481 def body @body end |
#id ⇒ Object
Returns the value of attribute id.
481 482 483 |
# File 'lib/jungle/client.rb', line 481 def id @id end |
#queue_path ⇒ Object
Returns the value of attribute queue_path.
481 482 483 |
# File 'lib/jungle/client.rb', line 481 def queue_path @queue_path end |
Instance Method Details
#inspect ⇒ Object
488 489 490 |
# File 'lib/jungle/client.rb', line 488 def inspect puts "#<Message id:#{@id} body:#{@body}>" end |