Method: Redis::Distributed#sort

Defined in:
lib/redis/distributed.rb

#sort(key, **options) ⇒ Object

Sort the elements in a list, set or sorted set.



252
253
254
255
256
257
258
# File 'lib/redis/distributed.rb', line 252

def sort(key, **options)
  keys = [key, options[:by], options[:store], *Array(options[:get])].compact

  ensure_same_node(:sort, keys) do |node|
    node.sort(key, **options)
  end
end