Method: Qup::Session#initialize

Defined in:
lib/qup/session.rb

#initialize(uri, options = {}) ⇒ Session

Public: Create a new Session

uri - The connection String used to connect to appropriate provider options - The Hash of options that are passed to the underlying Adapter

Returns a new Session



50
51
52
53
54
55
56
57
58
59
60
# File 'lib/qup/session.rb', line 50

def initialize( uri, options = {} )
  @uri       = URI.parse( uri )
  @root_path = Pathname.new( @uri.path )
  @options   = options

  adapter_klass = Qup::Adapters[@uri.scheme]
  @adapter      = adapter_klass.new( @uri, @options )

  @queues  = Hash.new
  @topics  = Hash.new
end