Class: Queight::Metadata
- Inherits:
-
Object
- Object
- Queight::Metadata
- Defined in:
- lib/queight/metadata.rb
Overview
Provides interface like AMQP::Header
Instance Method Summary collapse
- #ack ⇒ Object
-
#initialize(channel, delivery_info, properties) ⇒ Metadata
constructor
A new instance of Metadata.
- #redelivered? ⇒ Boolean
- #reject(options = {}) ⇒ Object
Constructor Details
#initialize(channel, delivery_info, properties) ⇒ Metadata
Returns a new instance of Metadata.
4 5 6 7 8 |
# File 'lib/queight/metadata.rb', line 4 def initialize(channel, delivery_info, properties) @channel = channel @delivery_info = delivery_info @properties = properties end |
Instance Method Details
#ack ⇒ Object
10 11 12 |
# File 'lib/queight/metadata.rb', line 10 def ack @channel.acknowledge(@delivery_info.delivery_tag) end |
#redelivered? ⇒ Boolean
19 20 21 |
# File 'lib/queight/metadata.rb', line 19 def redelivered? @delivery_info.redelivered? end |
#reject(options = {}) ⇒ Object
14 15 16 17 |
# File 'lib/queight/metadata.rb', line 14 def reject( = {}) requeue = .fetch(:requeue, false) @channel.reject(@delivery_info.delivery_tag, requeue) end |