Class: Freddy::Adapters::BunnyAdapter
- Inherits:
-
Object
- Object
- Freddy::Adapters::BunnyAdapter
- Defined in:
- lib/freddy/adapters/bunny_adapter.rb
Defined Under Namespace
Class Method Summary collapse
Instance Method Summary collapse
- #close ⇒ Object
- #create_channel(prefetch: nil) ⇒ Object
-
#initialize(bunny) ⇒ BunnyAdapter
constructor
A new instance of BunnyAdapter.
Constructor Details
#initialize(bunny) ⇒ BunnyAdapter
Returns a new instance of BunnyAdapter.
12 13 14 |
# File 'lib/freddy/adapters/bunny_adapter.rb', line 12 def initialize(bunny) @bunny = bunny end |
Class Method Details
.connect(config) ⇒ Object
6 7 8 9 10 |
# File 'lib/freddy/adapters/bunny_adapter.rb', line 6 def self.connect(config) bunny = Bunny.new(config) bunny.start new(bunny) end |
Instance Method Details
#close ⇒ Object
22 23 24 |
# File 'lib/freddy/adapters/bunny_adapter.rb', line 22 def close @bunny.close end |