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
-
#initialize(channel, consumer_tag, envelope, properties) ⇒ Headers
constructor
A new instance of Headers.
- #reject(options = {}) ⇒ Object
Constructor Details
#initialize(channel, consumer_tag, envelope, properties) ⇒ Headers
Returns a new instance of Headers.
264 265 266 267 268 269 |
# File 'lib/hot_bunnies/queue.rb', line 264 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.
262 263 264 |
# File 'lib/hot_bunnies/queue.rb', line 262 def channel @channel end |
#consumer_tag ⇒ Object (readonly)
Returns the value of attribute consumer_tag.
262 263 264 |
# File 'lib/hot_bunnies/queue.rb', line 262 def consumer_tag @consumer_tag end |
#envelope ⇒ Object (readonly)
Returns the value of attribute envelope.
262 263 264 |
# File 'lib/hot_bunnies/queue.rb', line 262 def envelope @envelope end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
262 263 264 |
# File 'lib/hot_bunnies/queue.rb', line 262 def properties @properties end |
Instance Method Details
#ack(options = {}) ⇒ Object
271 272 273 |
# File 'lib/hot_bunnies/queue.rb', line 271 def ack(={}) @channel.basic_ack(delivery_tag, .fetch(:multiple, false)) end |
#reject(options = {}) ⇒ Object
275 276 277 |
# File 'lib/hot_bunnies/queue.rb', line 275 def reject(={}) @channel.basic_reject(delivery_tag, .fetch(:requeue, false)) end |