Class: Push::Producer::DSL
- Inherits:
-
Object
- Object
- Push::Producer::DSL
- Defined in:
- lib/push/producer.rb
Overview
This gives us a nice Push.publish(message).to(exchange) DSL.
Instance Method Summary collapse
-
#initialize(backend, message) ⇒ DSL
constructor
A new instance of DSL.
- #to(exchange) ⇒ Object
Constructor Details
#initialize(backend, message) ⇒ DSL
Returns a new instance of DSL.
9 10 11 |
# File 'lib/push/producer.rb', line 9 def initialize(backend, ) @backend, @message = backend, end |
Instance Method Details
#to(exchange) ⇒ Object
13 14 15 |
# File 'lib/push/producer.rb', line 13 def to(exchange) @backend.publish(@message, exchange) end |