class RedisClient::Config
def initialize(
def initialize( url: nil, host: nil, port: nil, path: nil, username: nil, password: nil, **kwargs ) if url url_config = URLConfig.new(url) kwargs = { ssl: url_config.ssl?, db: url_config.db, }.compact.merge(kwargs) host ||= url_config.host port ||= url_config.port path ||= url_config.path username ||= url_config.username password ||= url_config.password end super(username: username, password: password, **kwargs) if @path = path @host = nil @port = nil else @host = host || DEFAULT_HOST @port = Integer(port || DEFAULT_PORT) end end