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:



1814
1815
1816
1817
1818
# File 'lib/redis.rb', line 1814

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