Class: Redstruct::Connection

Inherits:
Object
  • Object
show all
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.

Returns:

  • (Array<Symbol>)

    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

Instance Method Summary collapse

Constructor Details

#initialize(pool) ⇒ Connection

Returns a new instance of Connection.

Raises:



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

#poolObject (readonly)

Returns the value of attribute pool.



6
7
8
# File 'lib/redstruct/connection.rb', line 6

def pool
  @pool
end