Method: Redis::Commands::Hashes#hsetnx

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

#hsetnx(key, field, value) ⇒ Boolean

Set the value of a hash field, only if the field does not exist.



35
36
37
# File 'lib/redis/commands/hashes.rb', line 35

def hsetnx(key, field, value)
  send_command([:hsetnx, key, field, value], &Boolify)
end