Connects to redis and returns a client instance
Will connect in preference order to the provided uri, the REDIS_URL environment variable, or localhost:6379
TCP connections are supported via redis://:password@host:port/db (only host and port components are required)
Unix socket uris are supported, e.g. unix:///tmp/redis.sock, however it's not possible to set the db or password - use initialize instead in this case
# File lib/em-hiredis.rb, line 37 def self.connect(uri = nil) client = setup(uri) client.connect client end
# File lib/em-hiredis.rb, line 47 def self.logger @@logger ||= begin require 'logger' log = Logger.new(STDOUT) log.level = Logger::WARN log end end
Generated with the Darkfish Rdoc Generator 2.