Class: URI::Redis

Inherits:
Generic
  • Object
show all
Includes:
PerfectStrangers
Defined in:
lib/uri/redis.rb,
lib/uri/redis/version.rb

Overview

Redis URI

This is a subclass of URI::Generic and supports the following URI formats:

redis://host:port/dbindex

Examples:

uri = URI::Redis.build(host: "localhost", port: 6379, db: 2, key: "v1:arbitrary:key")
uri.to_s #=> "redis://localhost:6379/2/v1:arbitrary:key"

uri = URI::Redis.build(host: "localhost", port: 6379, db: 2)
uri.to_s #=> "redis://localhost:6379/2"

Constant Summary collapse

VERSION =
'1.4.0'
SUMMARY =
'A Ruby library for parsing, building and normalizing redis URLs'

Constants included from PerfectStrangers

PerfectStrangers::DEFAULT_DB, PerfectStrangers::DEFAULT_PORT

Method Summary

Methods included from PerfectStrangers

#conf, #db, #db=, included, #key, #key=, #request_uri, #serverid