Class: Authorize::Redis::ConnectionSpecification

Inherits:
Object
  • Object
show all
Defined in:
lib/authorize/redis/connection_specification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(db_spec) ⇒ ConnectionSpecification

Returns a new instance of ConnectionSpecification.



6
7
8
# File 'lib/authorize/redis/connection_specification.rb', line 6

def initialize(db_spec)
  @db_spec = db_spec
end

Instance Attribute Details

#db_specObject (readonly)

Returns the value of attribute db_spec.



4
5
6
# File 'lib/authorize/redis/connection_specification.rb', line 4

def db_spec
  @db_spec
end

Instance Method Details

#connect!Object

Factory method returning a new connection to the database conforming to the specification



11
12
13
# File 'lib/authorize/redis/connection_specification.rb', line 11

def connect!
  ::Redis.new(db_spec)
end