Class: Push::Producer::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/push/producer.rb

Overview

This gives us a nice Push.publish(message).to(exchange) DSL.

Instance Method Summary collapse

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, message)
  @backend, @message = backend, message
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