Class: Superbolt::Connection::Queue
- Inherits:
-
Base
- Object
- Base
- Superbolt::Connection::Queue
show all
- Defined in:
- lib/superbolt/connection/queue.rb
Instance Attribute Summary
Attributes inherited from Base
#config, #name
Instance Method Summary
collapse
Methods inherited from Base
#channel, default_options, #initialize, #q
Instance Method Details
#close(&block) ⇒ Object
8
9
10
11
12
13
|
# File 'lib/superbolt/connection/queue.rb', line 8
def close(&block)
connection.close
block.call if block
@connection = nil
@q = nil
end
|
#closing(&block) ⇒ Object
15
16
17
18
19
|
# File 'lib/superbolt/connection/queue.rb', line 15
def closing(&block)
response = block.call
close
response
end
|
#connection ⇒ Object
4
5
6
|
# File 'lib/superbolt/connection/queue.rb', line 4
def connection
@connection ||= Adapter::Bunny.new(config)
end
|
#writer ⇒ Object
21
22
23
24
|
# File 'lib/superbolt/connection/queue.rb', line 21
def writer
q connection.exchange
end
|