Class: Hopper::Channel::Queue::Proxy
- Inherits:
-
Object
- Object
- Hopper::Channel::Queue::Proxy
- Defined in:
- lib/hopper/channel/queue.rb
Instance Method Summary collapse
- #channel ⇒ Object
-
#initialize(bunny) ⇒ Proxy
constructor
A new instance of Proxy.
- #publish(message, opts = {}) ⇒ Object
- #subscribe(*args) ⇒ Object
Constructor Details
#initialize(bunny) ⇒ Proxy
Returns a new instance of Proxy.
5 6 7 |
# File 'lib/hopper/channel/queue.rb', line 5 def initialize(bunny) @bunny = bunny end |
Instance Method Details
#channel ⇒ Object
9 10 11 |
# File 'lib/hopper/channel/queue.rb', line 9 def channel @bunny.channel end |
#publish(message, opts = {}) ⇒ Object
13 14 15 |
# File 'lib/hopper/channel/queue.rb', line 13 def publish(, opts = {}) @bunny.publish(, opts) end |
#subscribe(*args) ⇒ Object
17 18 19 20 21 |
# File 'lib/hopper/channel/queue.rb', line 17 def subscribe(*args) @bunny.subscribe(*args) do |*a| yield a end end |