Class: Redstruct::Connection
- Inherits:
-
Object
- Object
- Redstruct::Connection
- Defined in:
- lib/redstruct/connection.rb
Constant Summary collapse
- NON_COMMAND_METHODS =
Returns List of methods from the Redis class that we don’t want to delegate to.
[:[], :[]=, :_eval, :_scan, :method_missing, :call, :dup, :inspect, :to_s].freeze
Instance Attribute Summary collapse
-
#pool ⇒ Object
readonly
Returns the value of attribute pool.
Instance Method Summary collapse
-
#initialize(pool) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(pool) ⇒ Connection
Returns a new instance of Connection.
8 9 10 11 |
# File 'lib/redstruct/connection.rb', line 8 def initialize(pool) raise(Redstruct::Error, 'Requires a ConnectionPool to proxy to') unless pool.is_a?(ConnectionPool) @pool = pool end |
Instance Attribute Details
#pool ⇒ Object (readonly)
Returns the value of attribute pool.
6 7 8 |
# File 'lib/redstruct/connection.rb', line 6 def pool @pool end |