Class: Rack::App::Worker::ClientProxy
- Inherits:
-
Object
- Object
- Rack::App::Worker::ClientProxy
- Defined in:
- lib/rack/app/worker/client_proxy.rb
Instance Method Summary collapse
- #broadcast ⇒ Object (also: #to_all)
-
#initialize(name) ⇒ ClientProxy
constructor
A new instance of ClientProxy.
- #send ⇒ Object (also: #to_one)
Constructor Details
#initialize(name) ⇒ ClientProxy
Returns a new instance of ClientProxy.
5 6 7 |
# File 'lib/rack/app/worker/client_proxy.rb', line 5 def initialize(name) @name = name end |
Instance Method Details
#broadcast ⇒ Object Also known as: to_all
15 16 17 |
# File 'lib/rack/app/worker/client_proxy.rb', line 15 def broadcast Rack::App::Worker::ClientProxy::Wrapper.new(rabbitmq.broadcast_exchange(@name)) end |
#send ⇒ Object Also known as: to_one
9 10 11 |
# File 'lib/rack/app/worker/client_proxy.rb', line 9 def send Rack::App::Worker::ClientProxy::Wrapper.new(rabbitmq.send_exchange(@name)) end |