Created
April 29, 2014 02:24
-
-
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?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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