Class: Mercury::Fake::QueuedMessage
- Inherits:
-
Object
- Object
- Mercury::Fake::QueuedMessage
- Defined in:
- lib/mercury/fake/queued_message.rb
Instance Attribute Summary collapse
-
#delivered ⇒ Object
Returns the value of attribute delivered.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#received_msg ⇒ Object
readonly
Returns the value of attribute received_msg.
-
#subscriber ⇒ Object
Returns the value of attribute subscriber.
Instance Method Summary collapse
-
#initialize(queue, msg, tag, headers, is_ackable) ⇒ QueuedMessage
constructor
A new instance of QueuedMessage.
Constructor Details
#initialize(queue, msg, tag, headers, is_ackable) ⇒ QueuedMessage
Returns a new instance of QueuedMessage.
10 11 12 13 14 15 |
# File 'lib/mercury/fake/queued_message.rb', line 10 def initialize(queue, msg, tag, headers, is_ackable) = Metadata.new(tag, headers, proc{queue.(self)}, proc{queue.nack(self)}) @received_msg = ReceivedMessage.new(msg, , nil, work_queue_name: is_ackable ? queue.worker : nil) @headers = headers @delivered = false end |
Instance Attribute Details
#delivered ⇒ Object
Returns the value of attribute delivered.
8 9 10 |
# File 'lib/mercury/fake/queued_message.rb', line 8 def delivered @delivered end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
7 8 9 |
# File 'lib/mercury/fake/queued_message.rb', line 7 def headers @headers end |
#received_msg ⇒ Object (readonly)
Returns the value of attribute received_msg.
7 8 9 |
# File 'lib/mercury/fake/queued_message.rb', line 7 def received_msg @received_msg end |
#subscriber ⇒ Object
Returns the value of attribute subscriber.
8 9 10 |
# File 'lib/mercury/fake/queued_message.rb', line 8 def subscriber @subscriber end |