Method: Redis#decrby

Defined in:
lib/redis.rb

#decrby(key, decrement) ⇒ Integer

Decrement the integer value of a key by the given number.

Examples:

redis.decrby("value", 5)
  # => 0

Parameters:

  • key (String)
  • decrement (Integer)

Returns:

  • (Integer)

    value after decrementing it


775
776
777
778
779
# File 'lib/redis.rb', line 775

def decrby(key, decrement)
  synchronize do |client|
    client.call([:decrby, key, decrement])
  end
end