class Redis
def zpopmax(key, count = nil)
-
(Array
- list of popped elements and scores>) -
(Array
- element and score pair if count is not specified)
Other tags:
- Example: With count option -
Example: Popping a member -
def zpopmax(key, count = nil) synchronize do |client| members = client.call([:zpopmax, key, count].compact, &FloatifyPairs) count.to_i > 1 ? members : members.first end end