Method: Redis::Commands::Strings#incr

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

#incr(key) ⇒ Integer

Increment the integer value of a key by one.

Examples:

redis.incr("value")
  # => 6


39
40
41
# File 'lib/redis/commands/strings.rb', line 39

def incr(key)
  send_command([:incr, key])
end