Method: Redis::Commands::SortedSets#zrevrangebyscore
- Defined in:
- lib/redis/commands/sorted_sets.rb
#zrevrangebyscore(key, max, min, withscores: false, with_scores: withscores, limit: nil) ⇒ Object
Return a range of members in a sorted set, by score, with scores ordered from high to low.
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 |
# File 'lib/redis/commands/sorted_sets.rb', line 558 def zrevrangebyscore(key, max, min, withscores: false, with_scores: withscores, limit: nil) args = [:zrevrangebyscore, key, max, min] if with_scores args << "WITHSCORES" block = FloatifyPairs end if limit args << "LIMIT" args.concat(limit.map { |l| Integer(l) }) end send_command(args, &block) end |