Skip to content

Commit

Permalink
Documented EM::Hiredis.connect
Browse files Browse the repository at this point in the history
  • Loading branch information
mloughran committed Apr 12, 2013
1 parent 5522a58 commit f94b41c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/em-hiredis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ def self.setup(uri = nil)
client
end

# 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)
def self.connect(uri = nil)
client = setup(uri)
client.connect
Expand Down

0 comments on commit f94b41c

Please sign in to comment.