Class: Hopper::Channel::Queue::Publisher

Inherits:
Object
  • Object
show all
Defined in:
lib/hopper/channel/queue/publisher.rb

Instance Method Summary collapse

Constructor Details

#initialize(proxy, opts = {}) ⇒ Publisher

Returns a new instance of Publisher.


5
6
7
# File 'lib/hopper/channel/queue/publisher.rb', line 5

def initialize(proxy, opts = {})
  @proxy = proxy
end

Instance Method Details

#publish(message, opts = {}) ⇒ Object


9
10
11
# File 'lib/hopper/channel/queue/publisher.rb', line 9

def publish(message, opts = {})
  @proxy.publish(message.payload, opts)
end