Method: Redis::Commands::Hashes#hincrby

Defined in:
lib/redis/commands/hashes.rb

#hincrby(key, field, increment) ⇒ Integer

Increment the integer value of a hash field by the given integer number.

Parameters:

  • key (String)
  • field (String)
  • increment (Integer)

Returns:

  • (Integer)

    value of the field after incrementing it



176
177
178
# File 'lib/redis/commands/hashes.rb', line 176

def hincrby(key, field, increment)
  send_command([:hincrby, key, field, Integer(increment)])
end