Class: Redis
- Inherits:
-
Object
- Object
- Redis
- Defined in:
- lib/uri/redis.rb
Overview
Adds a URI method to Redis
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.uri(conf = {}) ⇒ Object
116 117 118 |
# File 'lib/uri/redis.rb', line 116 def self.uri(conf = {}) URI.parse format("%s://%s:%s/%s", conf[:ssl] ? 'rediss' : 'redis', conf[:host], conf[:port], conf[:db]) end |
Instance Method Details
#uri ⇒ Object
120 121 122 |
# File 'lib/uri/redis.rb', line 120 def uri URI.parse @client.id end |