lib/message_queue.rb
# Public: Initialize a connection to a message queue.
#
# options - The Hash options used to initialize a connection
#           :adapter - The Symbol adapter, currently only :bunny is supported.
#                      Detailed options see individual adapter implementation.
#           :serializer - The Symbol serializer for serialization.
#
# Returns the connection for the specified message queue.
# Raises a RuntimeError if an adapter can't be found.
Initialize a connection to a message queue.
options - The Hash options used to initialize a connection
:adapter - The Symbol adapter, currently only :bunny is supported.
Detailed options see individual adapter implementation.
:serializer - The Symbol serializer for serialization.

Returns the connection for the specified message queue.
Raises a RuntimeError if an adapter can't be found.
Initialize a connection to a message queue . options - The Hash options used to initialize a connection : adapter - The Symbol adapter currently only : bunny is supported . Detailed options see individual adapter implementation . : serializer - The Symbol serializer for serialization . Returns the connection for the specified message queue . Raises a RuntimeError if an adapter can ' t be found .
def new_connection(options = {})
    options = options.to_hash
    adapter = load_adapter(options[:adapter])
    raise "Missing adapter #{options[:adapter]}" unless adapter
    serializer = load_serializer(options[:serializer])
    raise "Missing serializer #{options[:serializer]}" unless serializer
    adapter.new_connection(serializer, options)
  end
def new_connection ( options = { } ) options = options . to_hash adapter = load_adapter ( options [ :adapter ] ) raise "Missing adapter #{options[:adapter]}" unless adapter serializer = load_serializer ( options [ :serializer ] ) raise "Missing serializer #{options[:serializer]}" unless serializer adapter . new_connection ( serializer , options ) end
Public: Initialize a connection to a message queue.
Public : Initialize a connection to a message queue .
options
<not_specific>