Class: Twingly::AMQP::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/twingly/amqp/session.rb

Constant Summary collapse

DEFAULT_USER =
"guest".freeze
DEFAULT_PASS =
"guest".freeze
DEFAULT_HOSTS =
["localhost"].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Session

Returns a new instance of Session.



10
11
12
13
# File 'lib/twingly/amqp/session.rb', line 10

def initialize(options = {})
  @options    = options
  @connection = create_connection
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



4
5
6
# File 'lib/twingly/amqp/session.rb', line 4

def connection
  @connection
end

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/twingly/amqp/session.rb', line 4

def options
  @options
end