def yield_connection
      response = begin
        resource = @connection_pool.resource
        yield resource
      ensure
        resource.close if resource
      end

      if @convert_objects
        convert(response)
      else
        response
      end
    end
def yield_connection
      response = begin
        resource = @connection_pool.resource
        yield resource
      ensure
        resource.close if resource
      end

      if @convert_objects
        convert(response)
      else
        response
      end
    end
Construct a new JedisRb Pool.

 Possible options are:
   * config - (redis.clients.jedis.JedisPoolConfig/Wrapped::PoolConfig) the pool configuration
   * host - (String) Redis host
   * port - (Integer) Redis port
   * connection_timeout - (Integer) the connection timeout in milliseconds
   * password - (String) Redis password
   * database - (Integer) Redis database
   * client_name (String) the client name
   * convert_objects (Boolean) Ruby object casting

 By passing in convert_objects: true, Pool can convert return values to
 their Ruby type equivalent. Currently, the following are supported:
   * java.util.Set => Set
   * java.util.Map => Hash
   * java.util.List => Array

 Depending on your use case, this conversion may be costly, so it is not
 the default. Please evaluate your application's requirements carefully
 before opting in.
 Lease a connection from the pool and yield it to the given block.

 Leased connections will be automatically returned to the pool upon successful
 or unsuccessful execution of the block.

 Connections are of type redis.clients.jedis.Jedis.
 See the documentation[https://github.com/xetorthio/jedis/wiki] for more details.