Skip to content

Instantly share code, notes, and snippets.

@btn0s
Created April 29, 2014 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save btn0s/11389343 to your computer and use it in GitHub Desktop.
Save btn0s/11389343 to your computer and use it in GitHub Desktop.
How do I do a check if the input matches the key and value pair present in the hash?
class Sleigh
def authenticate(name, password)
# TODO
access = false
users = {"Santa Claus": "Ho Ho Ho!"}
if users[name] == "#{password}"
access = true
end
return access
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment