Module: RedisRds
- Defined in:
- lib/redis_rds.rb,
lib/redis_rds/set.rb,
lib/redis_rds/hash.rb,
lib/redis_rds/list.rb,
lib/redis_rds/mutex.rb,
lib/redis_rds/config.rb,
lib/redis_rds/object.rb,
lib/redis_rds/string.rb,
lib/redis_rds/counter.rb,
lib/redis_rds/version.rb,
lib/redis_rds/composite.rb,
lib/redis_rds/sorted_set.rb,
lib/redis_rds/nested_hash.rb,
lib/redis_rds/expirable_hash.rb,
lib/redis_rds/sorted_string_set.rb
Defined Under Namespace
Classes: Composite, Counter, ExpirableHash, Hash, List, Mutex, NestedHash, Object, Set, SortedSet, SortedStringSet, String
Constant Summary collapse
- VERSION =
'0.1.5'.freeze
Class Method Summary collapse
- .config ⇒ Object
-
.configure(opts = {}) ⇒ Object
Configure through hash.
Class Method Details
.config ⇒ Object
33 34 35 |
# File 'lib/redis_rds/config.rb', line 33 def self.config @config end |
.configure(opts = {}) ⇒ Object
Configure through hash
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/redis_rds/config.rb', line 20 def self.configure(opts = {}) opts.each { |k, v| @config[k.to_sym] = v if @valid_config_keys.include? k.to_sym } if opts[:connection].present? connection = opts[:connection] else config[:db] = config[:db].to_i connection = Redis.new(config) end RedisRds::Object.configure(connection: connection, namespace: opts[:namespace]) end |