Class: KarlMalone::Consumer

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/karl_malone/consumer.rb

Instance Method Summary collapse

Constructor Details

#initialize(callback_object, callback, exchange_options, queue_options) ⇒ Consumer

Returns a new instance of Consumer.



11
12
13
# File 'lib/karl_malone/consumer.rb', line 11

def initialize(callback_object, callback, exchange_options, queue_options)
  @options = ConsumerOptions.new(exchange_options, queue_options)
end

Instance Method Details

#start!(connection) ⇒ Object



15
16
17
# File 'lib/karl_malone/consumer.rb', line 15

def start!(connection)
  bind_callback(queue(channel(connection)))
end