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



625
626
627
628
629
# File 'lib/redis.rb', line 625

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