Method: Redis::Commands::SortedSets#zrangebyscore
- Defined in:
- lib/redis/commands/sorted_sets.rb
#zrangebyscore(key, min, max, withscores: false, with_scores: withscores, limit: nil) ⇒ Array<String>, Array<[String, Float]>
Return a range of members in a sorted set, by score.
528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 |
# File 'lib/redis/commands/sorted_sets.rb', line 528 def zrangebyscore(key, min, max, withscores: false, with_scores: withscores, limit: nil) args = [:zrangebyscore, key, min, max] 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 |