Method: Redis#incrby

Defined in:
lib/redis.rb

#incrby(key, increment) ⇒ Fixnum

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

Examples:

redis.incrby("value", 5)
  # => 10

Parameters:

  • key (String)
  • increment (Fixnum)

Returns:

  • (Fixnum)

    value after incrementing it


758
759
760
761
762
# File 'lib/redis.rb', line 758

def incrby(key, increment)
  synchronize do |client|
    client.call([:incrby, key, increment])
  end
end