class RedisClient::Config
Constants
- DEFAULT_DB
- DEFAULT_HOST
- DEFAULT_PORT
- DEFAULT_TIMEOUT
- DEFAULT_USERNAME
Attributes
Public Class Methods
Source
# File lib/redis_client/config.rb, line 185 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
Calls superclass method
RedisClient::Config::Common::new