Method: Redis#hmset

Defined in:
lib/redis.rb

#hmset(key, *attrs) ⇒ Object

Set one or more hash values.

Examples:

redis.hmset("hash", "f1", "v1", "f2", "v2")
  # => "OK"

Parameters:

  • key (String)
  • attrs (Array<String>)

    array of fields and values

See Also:



1346
1347
1348
1349
1350
# File 'lib/redis.rb', line 1346

def hmset(key, *attrs)
  synchronize do
    @client.call [:hmset, key, *attrs]
  end
end