Class: HotBunnies::Queue::Headers
- Inherits:
-
Object
- Object
- HotBunnies::Queue::Headers
- Defined in:
- lib/hot_bunnies/queue.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
-
#consumer_tag ⇒ Object
readonly
Returns the value of attribute consumer_tag.
-
#envelope ⇒ Object
readonly
Returns the value of attribute envelope.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Instance Method Summary collapse
- #ack(options = {}) ⇒ Object
- #delivery_tag ⇒ Object
-
#initialize(channel, consumer_tag, envelope, properties) ⇒ Headers
constructor
A new instance of Headers.
- #reject(options = {}) ⇒ Object
- #routing_key ⇒ Object
Constructor Details
#initialize(channel, consumer_tag, envelope, properties) ⇒ Headers
Returns a new instance of Headers.
127 128 129 130 131 132 |
# File 'lib/hot_bunnies/queue.rb', line 127 def initialize(channel, consumer_tag, envelope, properties) @channel = channel @consumer_tag = consumer_tag @envelope = envelope @properties = properties end |
Instance Attribute Details
#channel ⇒ Object (readonly)
Returns the value of attribute channel.
125 126 127 |
# File 'lib/hot_bunnies/queue.rb', line 125 def channel @channel end |
#consumer_tag ⇒ Object (readonly)
Returns the value of attribute consumer_tag.
125 126 127 |
# File 'lib/hot_bunnies/queue.rb', line 125 def consumer_tag @consumer_tag end |
#envelope ⇒ Object (readonly)
Returns the value of attribute envelope.
125 126 127 |
# File 'lib/hot_bunnies/queue.rb', line 125 def envelope @envelope end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
125 126 127 |
# File 'lib/hot_bunnies/queue.rb', line 125 def properties @properties end |
Instance Method Details
#ack(options = {}) ⇒ Object
134 135 136 |
# File 'lib/hot_bunnies/queue.rb', line 134 def ack(={}) @channel.basic_ack(delivery_tag, .fetch(:multiple, false)) end |
#delivery_tag ⇒ Object
142 143 144 |
# File 'lib/hot_bunnies/queue.rb', line 142 def delivery_tag @envelope.delivery_tag end |
#reject(options = {}) ⇒ Object
138 139 140 |
# File 'lib/hot_bunnies/queue.rb', line 138 def reject(={}) @channel.basic_reject(delivery_tag, .fetch(:requeue, false)) end |
#routing_key ⇒ Object
146 147 148 |
# File 'lib/hot_bunnies/queue.rb', line 146 def routing_key @envelope.routing_key end |