Class: Redis::Attrs::Hash

Inherits:
Complex show all
Defined in:
lib/redis-attrs/hash.rb

Instance Attribute Summary

Attributes inherited from Base

#klass, #name, #options, #type

Instance Method Summary collapse

Methods inherited from Complex

#initialize, redis_object_class

Methods inherited from Base

#initialize, #redis, #redis_key

Constructor Details

This class inherits a constructor from Redis::Attrs::Complex

Instance Method Details

#setter(id, hash_object, new_hash) ⇒ Object


4
5
6
7
# File 'lib/redis-attrs/hash.rb', line 4

def setter(id, hash_object, new_hash)
  redis.del redis_key(id)
  new_hash.each { |key, value| hash_object[key] = value }
end