Module: Bunny

Defined in:
lib/stuffed_bunny/bunny_overrides.rb

Overview

Overriding the Bunny gem’s modules and classes.

NOTE: Not everything in Bunny is stubbed here. Pull requests are welcome.

Defined Under Namespace

Classes: Client, Exchange, Queue

Class Method Summary collapse

Class Method Details

.reset_exchangesObject

Resets the class-level exchanges.



13
14
15
# File 'lib/stuffed_bunny/bunny_overrides.rb', line 13

def self.reset_exchanges
  Bunny::Client.send(:class_variable_set, :@@exchanges, {})
end

.run(options = {}) {|bunny| ... } ⇒ Object

Yields:

  • (bunny)


7
8
9
10
# File 'lib/stuffed_bunny/bunny_overrides.rb', line 7

def self.run(options = {})
  bunny = Bunny::Client.new(options)
  yield bunny
end