class Sidekiq::Hierarchy::RedisConnection::ConnectionProxy
A translation class turning a Redis object into a ConnectionPool-alike
Attributes
redis[R]
Public Class Methods
new(redis_conn)
click to toggle source
# File lib/sidekiq/hierarchy/redis_connection.rb, line 8 def initialize(redis_conn) raise 'connection must be an instance of Redis' unless redis_conn.is_a?(::Redis) @redis = redis_conn end
Public Instance Methods
with(&blk)
click to toggle source
# File lib/sidekiq/hierarchy/redis_connection.rb, line 13 def with(&blk) blk.call(redis) end