module Redis::Commands::SortedSets

def zpopmin(key, count = nil)

Returns:
  • (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 zpopmin(key, count = nil)
  send_command([:zpopmin, key, count].compact) do |members|
    members = FloatifyPairs.call(members)
    count.to_i > 1 ? members : members.first
  end
end