Method: Collectr::RedisHash#initialize

Defined in:
lib/collectr/redis/redis_hash.rb

#initialize(name, options = {}) ⇒ RedisHash

Returns a new instance of RedisHash.



9
10
11
12
13
14
15
# File 'lib/collectr/redis/redis_hash.rb', line 9

def initialize(name, options={})
  @title = name
  # Use raw only when both the keys and values are strings.
  @raw = options.fetch(:raw) { false }
  @store = Redis.current
  @expires_in = options[:expires_in]
end