Class: DedupeRequests::RedisStore::NullPool

Inherits:
Object
  • Object
show all
Defined in:
lib/dedupe_requests/redis_store.rb

Overview

Wraps a bare Redis client so it responds to #with like a connection pool, giving one uniform access path regardless of what the user injected.

Instance Method Summary collapse

Constructor Details

#initialize(redis) ⇒ NullPool

Returns a new instance of NullPool.



26
27
28
# File 'lib/dedupe_requests/redis_store.rb', line 26

def initialize(redis)
  @redis = redis
end

Instance Method Details

#with {|@redis| ... } ⇒ Object

Yields:

  • (@redis)


30
31
32
# File 'lib/dedupe_requests/redis_store.rb', line 30

def with
  yield @redis
end