class Redis

def zrangebyscore(key, min, max, options = {})

Returns:
  • (Array, Array<[String, Float]>) -

Parameters:
  • options (Hash) --
  • max (String) --
  • min (String) --
  • key (String) --

Other tags:
    Example: Retrieve members and their scores with scores `> 5` -
    Example: Retrieve the first 2 members with score `>= 0` -
    Example: Retrieve members with score `>= 5` and `< 100` -
def zrangebyscore(key, min, max, options = {})
  args = []
  with_scores = options[:with_scores] || options[:withscores]
  if with_scores
    args << "WITHSCORES"
    block = FloatifyPairs
  end
  limit = options[:limit]
  args.concat(["LIMIT"] + limit) if limit
  synchronize do |client|
    client.call([:zrangebyscore, key, min, max] + args, &block)
  end
end