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.
133 134 135 136 137 138 |
# File 'lib/hot_bunnies/queue.rb', line 133 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.
131 132 133 |
# File 'lib/hot_bunnies/queue.rb', line 131 def channel @channel end |
#consumer_tag ⇒ Object (readonly)
Returns the value of attribute consumer_tag.
131 132 133 |
# File 'lib/hot_bunnies/queue.rb', line 131 def consumer_tag @consumer_tag end |
#envelope ⇒ Object (readonly)
Returns the value of attribute envelope.
131 132 133 |
# File 'lib/hot_bunnies/queue.rb', line 131 def envelope @envelope end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
131 132 133 |
# File 'lib/hot_bunnies/queue.rb', line 131 def properties @properties end |
Instance Method Details
#ack(options = {}) ⇒ Object
140 141 142 |
# File 'lib/hot_bunnies/queue.rb', line 140 def ack(={}) @channel.basic_ack(delivery_tag, .fetch(:multiple, false)) end |
#delivery_tag ⇒ Object
148 149 150 |
# File 'lib/hot_bunnies/queue.rb', line 148 def delivery_tag @envelope.delivery_tag end |
#reject(options = {}) ⇒ Object
144 145 146 |
# File 'lib/hot_bunnies/queue.rb', line 144 def reject(={}) @channel.basic_reject(delivery_tag, .fetch(:requeue, false)) end |
#routing_key ⇒ Object
152 153 154 |
# File 'lib/hot_bunnies/queue.rb', line 152 def routing_key @envelope.routing_key end |