class Redis

def mapped_hmget(key, *fields)

Other tags:
    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)
  hmget(key, *fields) do |reply|
    if reply.kind_of?(Array)
      Hash[fields.zip(reply)]
    else
      reply
    end
  end
end