# File lib/redis/store/factory.rb, line 9 def self.create(*options) new(options).create end
# File lib/redis/store/factory.rb, line 39 def self.extract_host_options_from_hash(options) options = normalize_key_names(options) if host_options?(options) options else nil end end
# File lib/redis/store/factory.rb, line 62 def self.extract_host_options_from_uri(uri) uri = URI.parse(uri) _, db, namespace = if uri.path uri.path.split(/\//) end options = { :host => uri.host, :port => uri.port || DEFAULT_PORT, :password => uri.password } options[:db] = db.to_i if db options[:namespace] = namespace if namespace options end
# File lib/redis/store/factory.rb, line 54 def self.host_options?(options) if options.keys.any? {|n| [:host, :db, :port].include?(n) } options else nil # just to be clear end end
# File lib/redis/store/factory.rb, line 13 def initialize(*options) @addresses = [] @options = {} extract_addresses_and_options(options) end
Generated with the Darkfish Rdoc Generator 2.