Class: Authorize::Redis::ConnectionSpecification
- Inherits:
-
Object
- Object
- Authorize::Redis::ConnectionSpecification
- Defined in:
- lib/authorize/redis/connection_specification.rb
Instance Attribute Summary collapse
-
#db_spec ⇒ Object
readonly
Returns the value of attribute db_spec.
Instance Method Summary collapse
-
#connect! ⇒ Object
Factory method returning a new connection to the database conforming to the specification.
-
#initialize(db_spec) ⇒ ConnectionSpecification
constructor
A new instance of ConnectionSpecification.
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_spec ⇒ Object (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 |