Class: RightAws::SqsGen2::Message
- Inherits:
-
Object
- Object
- RightAws::SqsGen2::Message
- Defined in:
- lib/sqs/right_sqs_gen2.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#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, attributes = 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, attributes = nil) ⇒ Message
Returns a new instance of Message.
309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/sqs/right_sqs_gen2.rb', line 309 def initialize(queue, id=nil, rh = nil, body=nil, visibility=nil, attributes=nil) @queue = queue @id = id @receipt_handle = rh @body = body @visibility = visibility @attributes = attributes @sent_at = nil @received_at = nil @send_checksum = nil @receive_checksum = nil end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
306 307 308 |
# File 'lib/sqs/right_sqs_gen2.rb', line 306 def attributes @attributes end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
306 307 308 |
# File 'lib/sqs/right_sqs_gen2.rb', line 306 def body @body end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
306 307 308 |
# File 'lib/sqs/right_sqs_gen2.rb', line 306 def id @id end |
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
306 307 308 |
# File 'lib/sqs/right_sqs_gen2.rb', line 306 def queue @queue end |
#receipt_handle ⇒ Object (readonly)
Returns the value of attribute receipt_handle.
306 307 308 |
# File 'lib/sqs/right_sqs_gen2.rb', line 306 def receipt_handle @receipt_handle end |
#receive_checksum ⇒ Object
Returns the value of attribute receive_checksum.
307 308 309 |
# File 'lib/sqs/right_sqs_gen2.rb', line 307 def receive_checksum @receive_checksum end |
#received_at ⇒ Object
Returns the value of attribute received_at.
307 308 309 |
# File 'lib/sqs/right_sqs_gen2.rb', line 307 def received_at @received_at end |
#send_checksum ⇒ Object
Returns the value of attribute send_checksum.
307 308 309 |
# File 'lib/sqs/right_sqs_gen2.rb', line 307 def send_checksum @send_checksum end |
#sent_at ⇒ Object
Returns the value of attribute sent_at.
307 308 309 |
# File 'lib/sqs/right_sqs_gen2.rb', line 307 def sent_at @sent_at end |
#visibility ⇒ Object
Returns the value of attribute visibility.
306 307 308 |
# File 'lib/sqs/right_sqs_gen2.rb', line 306 def visibility @visibility end |
Instance Method Details
#delete ⇒ Object
Removes message from queue. Returns true
.
335 336 337 |
# File 'lib/sqs/right_sqs_gen2.rb', line 335 def delete @queue.sqs.interface.(@queue.url, @receipt_handle) if @receipt_handle end |
#to_s ⇒ Object
Returns Message
instance body.
323 324 325 |
# File 'lib/sqs/right_sqs_gen2.rb', line 323 def to_s @body end |