Method: Redis#sort
- Defined in:
- lib/redis.rb
#sort(key, options = {}) ⇒ Object
Sort the elements in a list, set or sorted set.
899 900 901 902 903 904 905 906 907 908 909 910 911 |
# File 'lib/redis.rb', line 899 def sort(key, = {}) command = CommandOptions.new() do |c| c.value :by c.splat :limit c.multi :get c.words :order c.value :store end synchronize do @client.call [:sort, key, *command.to_a] end end |