Class: RAWS::SQS::Message
- Inherits:
-
Object
- Object
- RAWS::SQS::Message
- Defined in:
- lib/raws/sqs/message.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
Instance Method Summary collapse
- #attributes ⇒ Object (also: #attrs)
- #body ⇒ Object
- #change_visibility(visibility_timeout) ⇒ Object (also: #visibility=)
- #delete ⇒ Object
-
#initialize(queue, data) ⇒ Message
constructor
A new instance of Message.
- #md5_of_body ⇒ Object
- #message_id ⇒ Object (also: #id)
- #receipt_handle ⇒ Object
Constructor Details
#initialize(queue, data) ⇒ Message
Returns a new instance of Message.
5 6 7 |
# File 'lib/raws/sqs/message.rb', line 5 def initialize(queue, data) @queue, @data = queue, data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/raws/sqs/message.rb', line 3 def data @data end |
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
2 3 4 |
# File 'lib/raws/sqs/message.rb', line 2 def queue @queue end |
Instance Method Details
#attributes ⇒ Object Also known as: attrs
22 23 24 |
# File 'lib/raws/sqs/message.rb', line 22 def attributes data['Attribute'] end |
#body ⇒ Object
27 28 29 |
# File 'lib/raws/sqs/message.rb', line 27 def body data['Body'] end |
#change_visibility(visibility_timeout) ⇒ Object Also known as: visibility=
31 32 33 |
# File 'lib/raws/sqs/message.rb', line 31 def change_visibility(visibility_timeout) queue. receipt_handle, visibility_timeout end |
#delete ⇒ Object
36 37 38 |
# File 'lib/raws/sqs/message.rb', line 36 def delete queue. receipt_handle end |
#md5_of_body ⇒ Object
18 19 20 |
# File 'lib/raws/sqs/message.rb', line 18 def md5_of_body data['MD5OfBody'] end |
#message_id ⇒ Object Also known as: id
9 10 11 |
# File 'lib/raws/sqs/message.rb', line 9 def data['MessageId'] end |
#receipt_handle ⇒ Object
14 15 16 |
# File 'lib/raws/sqs/message.rb', line 14 def receipt_handle data['ReceiptHandle'] end |