class AsyncStorage::RedisPool

Public Class Methods

new(connection) click to toggle source
# File lib/async_storage/redis_pool.rb, line 17
def initialize(connection)
  if connection.respond_to?(:with)
    @connection = connection
  else
    if connection.respond_to?(:client)
      @connection = connection
    else
      @connection = ::Redis.new(*[connection].compact)
    end
    @connection.extend(ConnectionPoolLike)
  end
end