Module: BunnyExchanges
- Defined in:
- lib/bunny_exchanges.rb,
lib/bunny_exchanges/manager.rb,
lib/bunny_exchanges/version.rb,
lib/bunny_exchanges/configuration.rb
Defined Under Namespace
Classes: Configuration, Manager
Constant Summary collapse
- UndefinedExchange =
The required exchange is not defined.
Class.new(StandardError)
- VERSION =
"0.0.1"
Class Method Summary collapse
-
.configuration ⇒ Configuration
BunnyExchanges configuration.
-
.configure {|configuration| ... } ⇒ Object
A helper to configure BunnyExchanges.
-
.get(action) ⇒ Bunny::Exchange
Delegates ‘#get` to the current manager.
-
.manager ⇒ BunnyExchanges::Manager
The current instance of Manager.
Class Method Details
.configuration ⇒ Configuration
BunnyExchanges configuration
10 11 12 |
# File 'lib/bunny_exchanges.rb', line 10 def self.configuration @configuration ||= Configuration.new end |
.configure {|configuration| ... } ⇒ Object
A helper to configure BunnyExchanges
17 18 19 |
# File 'lib/bunny_exchanges.rb', line 17 def self.configure yield configuration end |
.get(action) ⇒ Bunny::Exchange
Delegates ‘#get` to the current manager. Returns the required exchange.
28 29 30 |
# File 'lib/bunny_exchanges.rb', line 28 def self.get action manager.get(action) end |
.manager ⇒ BunnyExchanges::Manager
The current instance of Manager.
36 37 38 |
# File 'lib/bunny_exchanges.rb', line 36 def self.manager @manager ||= Manager.new(configuration) end |