module Redis::Commands::Hashes
def mapped_hmget(key, *fields)
- See: #hmget -
Returns:
-
(Hash)
- a hash mapping the specified fields to their values
Parameters:
-
fields
(Array
) -- array of fields -
key
(String
) --
def mapped_hmget(key, *fields) fields.flatten!(1) hmget(key, fields) do |reply| if reply.is_a?(Array) Hash[fields.zip(reply)] else reply end end end