class Redis

def mapped_mget(*keys)

Other tags:
    See: #mget -

Returns:
  • (Hash) - a hash mapping the specified keys to their values

Parameters:
  • keys (Array) -- array of keys
def mapped_mget(*keys)
  mget(*keys) do |reply|
    if reply.kind_of?(Array)
      Hash[keys.zip(reply)]
    else
      reply
    end
  end
end