Method: Conflow::Redis::HashField#overwrite
- Defined in:
- lib/conflow/redis/hash_field.rb
#overwrite(new_hash) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Replaces currently stored hash with one given as param
26 27 28 29 30 31 32 33 |
# File 'lib/conflow/redis/hash_field.rb', line 26 def overwrite(new_hash) redis.with do |conn| conn.pipelined do conn.del(key) conn.hmset(key, prepare_hash(new_hash).flatten) end end end |