Class: FreshRedis

Inherits:
Object
  • Object
show all
Includes:
Hash, String
Defined in:
lib/fresh_redis.rb,
lib/fresh_redis/key.rb,
lib/fresh_redis/hash.rb,
lib/fresh_redis/string.rb,
lib/fresh_redis/version.rb

Defined Under Namespace

Modules: Hash, String Classes: Key

Constant Summary collapse

VERSION =
"0.0.6"

Instance Method Summary collapse

Methods included from String

#fincr, #fsum

Methods included from Hash

#fhdel, #fhget, #fhgetall, #fhset

Constructor Details

#initialize(redis, options = {}) ⇒ FreshRedis

Returns a new instance of FreshRedis.



10
11
12
13
# File 'lib/fresh_redis.rb', line 10

def initialize(redis, options={})
  @redis = redis
  @options = options
end

Instance Method Details

#build_key(base_key, options = {}) ⇒ Object



15
16
17
18
# File 'lib/fresh_redis.rb', line 15

def build_key(base_key, options={})
  options = @options.merge(options)
  Key.build(base_key, options)
end