Module: HotBunnies

Defined in:
lib/hot_bunnies.rb,
lib/hot_bunnies/queue.rb,
lib/hot_bunnies/channel.rb,
lib/hot_bunnies/version.rb,
lib/hot_bunnies/exchange.rb

Defined Under Namespace

Modules: Channel Classes: Exchange, Queue

Constant Summary collapse

CONNECTION_PROPERTIES =
[:host, :port, :virtual_host, :connection_timeout, :username, :password]
VERSION =
'1.2.2'

Class Method Summary collapse

Class Method Details

.connect(options = {}) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/hot_bunnies.rb', line 19

def self.connect(options={})
  cf = ConnectionFactory.new
  CONNECTION_PROPERTIES.each do |property|
    if options[property]
      cf.send("#{property}=".to_sym, options[property])
    end
  end
  cf.new_connection
end