Class: Conflow::Redis::ConnectionWrapper
- Inherits:
-
Object
- Object
- Conflow::Redis::ConnectionWrapper
- Defined in:
- lib/conflow/redis/connection_wrapper.rb
Overview
Wraps Redis connection to behave like connection pool
Instance Method Summary collapse
-
#initialize(redis) ⇒ ConnectionWrapper
constructor
A new instance of ConnectionWrapper.
-
#with {|redis| ... } ⇒ Object
Allows accessing Redis connection.
Constructor Details
#initialize(redis) ⇒ ConnectionWrapper
Returns a new instance of ConnectionWrapper.
8 9 10 |
# File 'lib/conflow/redis/connection_wrapper.rb', line 8 def initialize(redis) @redis = redis end |
Instance Method Details
#with {|redis| ... } ⇒ Object
Allows accessing Redis connection
14 15 16 |
# File 'lib/conflow/redis/connection_wrapper.rb', line 14 def with yield @redis end |