Class: Aws::Sqs::Message
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
-
#receipt_handle ⇒ Object
readonly
Returns the value of attribute receipt_handle.
-
#receive_checksum ⇒ Object
Returns the value of attribute receive_checksum.
-
#received_at ⇒ Object
Returns the value of attribute received_at.
-
#send_checksum ⇒ Object
Returns the value of attribute send_checksum.
-
#sent_at ⇒ Object
Returns the value of attribute sent_at.
-
#visibility ⇒ Object
Returns the value of attribute visibility.
Instance Method Summary collapse
-
#delete ⇒ Object
Removes message from queue.
-
#initialize(queue, id = nil, rh = nil, body = nil, visibility = nil) ⇒ Message
constructor
A new instance of Message.
-
#to_s ⇒ Object
Returns
Message
instance body.
Constructor Details
#initialize(queue, id = nil, rh = nil, body = nil, visibility = nil) ⇒ Message
Returns a new instance of Message.
265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/sqs/sqs.rb', line 265 def initialize(queue, id=nil, rh = nil, body=nil, visibility=nil) @queue = queue @id = id @receipt_handle = rh @body = body @visibility = visibility @sent_at = nil @received_at = nil @send_checksum = nil @receive_checksum = nil end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
262 263 264 |
# File 'lib/sqs/sqs.rb', line 262 def body @body end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
262 263 264 |
# File 'lib/sqs/sqs.rb', line 262 def id @id end |
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
262 263 264 |
# File 'lib/sqs/sqs.rb', line 262 def queue @queue end |
#receipt_handle ⇒ Object (readonly)
Returns the value of attribute receipt_handle.
262 263 264 |
# File 'lib/sqs/sqs.rb', line 262 def receipt_handle @receipt_handle end |
#receive_checksum ⇒ Object
Returns the value of attribute receive_checksum.
263 264 265 |
# File 'lib/sqs/sqs.rb', line 263 def receive_checksum @receive_checksum end |
#received_at ⇒ Object
Returns the value of attribute received_at.
263 264 265 |
# File 'lib/sqs/sqs.rb', line 263 def received_at @received_at end |
#send_checksum ⇒ Object
Returns the value of attribute send_checksum.
263 264 265 |
# File 'lib/sqs/sqs.rb', line 263 def send_checksum @send_checksum end |
#sent_at ⇒ Object
Returns the value of attribute sent_at.
263 264 265 |
# File 'lib/sqs/sqs.rb', line 263 def sent_at @sent_at end |
#visibility ⇒ Object
Returns the value of attribute visibility.
262 263 264 |
# File 'lib/sqs/sqs.rb', line 262 def visibility @visibility end |
Instance Method Details
#delete ⇒ Object
Removes message from queue. Returns true
.
284 285 286 |
# File 'lib/sqs/sqs.rb', line 284 def delete @queue.sqs.interface.(@queue.url, @receipt_handle) if @receipt_handle end |
#to_s ⇒ Object
Returns Message
instance body.
278 279 280 |
# File 'lib/sqs/sqs.rb', line 278 def to_s @body end |