Method: Bunny::Queue#unbind
- Defined in:
- lib/bunny/queue.rb
#unbind(exchange, opts = {}) ⇒ Object
Unbinds queue from an exchange
179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/bunny/queue.rb', line 179 def unbind(exchange, opts = {}) @channel.queue_unbind(@name, exchange, opts) exchange_name = if exchange.respond_to?(:name) exchange.name else exchange end @bindings.delete_if { |b| b[:exchange] == exchange_name && b[:routing_key] == (opts[:routing_key] || opts[:key]) && b[:arguments] == opts[:arguments] } self end |