Class: RedisStore::Config
- Inherits:
-
Hash
- Object
- Hash
- RedisStore::Config
- Defined in:
- lib/redis_store.rb
Instance Method Summary collapse
-
#initialize(address_or_options) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(address_or_options) ⇒ Config
Returns a new instance of Config.
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/redis_store.rb', line 15 def initialize() = if .is_a?(Hash) else host, port = .split(/\:/) port, db = port.split(/\//) if port { :host => host, :port => port, :db => db } end self[:host] = [:host] if [:host] self[:port] = [:port] if [:port] self[:db] = [:db] if [:db] end |