class Redis
def zrevrange(key, start, stop, options = {})
- See: #zrange -
Other tags:
- Example: Retrieve all members and their scores from a sorted set -
Example: Retrieve all members from a sorted set -
def zrevrange(key, start, stop, options = {}) args = [] with_scores = options[:with_scores] || options[:withscores] args << "WITHSCORES" if with_scores synchronize do |client| client.call [:zrevrange, key, start, stop, *args] do |reply| if with_scores if reply reply.each_slice(2).map do |member, score| [member, Float(score)] end end else reply end end end end