Class: Recognizer::Input::AMQP
- Defined in:
- lib/recognizer/inputs/amqp.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ AMQP
constructor
A new instance of AMQP.
- #run ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(options = {}) ⇒ AMQP
Returns a new instance of AMQP.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/recognizer/inputs/amqp.rb', line 6 def initialize(={}) super @enabled = @options.has_key?(:amqp) @options[:amqp] ||= Hash.new @options[:amqp][:exchange] ||= Hash.new @options[:amqp][:exchange][:name] ||= "graphite" @options[:amqp][:exchange][:durable] ||= false @options[:amqp][:exchange][:routing_key] ||= "#" @options[:amqp][:exchange][:type] ||= (@options[:amqp][:exchange][:type] || "topic").to_sym end |
Instance Method Details
#run ⇒ Object
19 20 21 |
# File 'lib/recognizer/inputs/amqp.rb', line 19 def run setup_consumer end |