Method: Conflow::Redis::SortedSetField#add

Defined in:
lib/conflow/redis/sorted_set_field.rb

#add(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.

Adds one or more keys to the set.

Examples:

Adding multiple fields

field.add(last: 10, tied: 2, second: 4, first: 2)

Parameters:

  • hash (Hash)

    hash of values and scores to be added

Returns:

  • (String)

    Redis response



15
16
17
# File 'lib/conflow/redis/sorted_set_field.rb', line 15

def add(hash)
  command :zadd, [key, hash_to_array(hash)]
end