Class Rufus::SQS::Message

  1. lib/rufus/sqs.rb
Parent: Object

An SQS message (after its creation).

Methods

public class

  1. new

public instance

  1. delete

Attributes

message_body [R]
message_id [R]
queue [R]

Public class methods

new (queue, xml_element)
[show source]
    # File lib/rufus/sqs.rb, line 52
52:     def initialize (queue, xml_element)
53: 
54:       @queue = queue
55:       @message_id = SQS::get_element_text(xml_element, "MessageId")
56:       @message_body = SQS::get_element_text(xml_element, "MessageBody")
57:     end

Public instance methods

delete ()

Connects to the queue service and deletes this message in its queue.

[show source]
    # File lib/rufus/sqs.rb, line 62
62:     def delete
63: 
64:       @queue.queue_service.delete_message(@queue, @message_id)
65:     end