Method: Conflow::Redis::SortedSetField#to_h

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

#to_hHash

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.

Creates regular Ruby Hash based on Redis values.

Returns:

  • (Hash)

    Hash representing this Sorted set



50
51
52
# File 'lib/conflow/redis/sorted_set_field.rb', line 50

def to_h
  Hash[command :zrange, [key, 0, -1, with_scores: true]]
end