module Redis::Commands::Hashes

def hset(key, *attrs)

Returns:
  • (Integer) - The number of fields that were added to the hash

Parameters:
  • attrs (Array | Hash) -- array or hash of fields and values
  • key (String) --
def hset(key, *attrs)
  attrs = attrs.first.flatten if attrs.size == 1 && attrs.first.is_a?(Hash)
  send_command([:hset, key, *attrs])
end