Method: Redis::Distributed#sort

Defined in:
lib/redis/distributed.rb

#sort(key, **options) ⇒ Object

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



242
243
244
245
246
247
248
# File 'lib/redis/distributed.rb', line 242

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