Method: Conflow::Redis::SortedSetField#overwrite
- Defined in:
- lib/conflow/redis/sorted_set_field.rb
#overwrite(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.
Removes old values from the set and overrides them with new.
57 58 59 60 61 62 63 64 |
# File 'lib/conflow/redis/sorted_set_field.rb', line 57 def overwrite(hash) redis.with do |conn| conn.pipelined do conn.del(key) conn.zadd(key, hash_to_array(hash)) end end end |