Guest User

Untitled

a guest
Jun 13th, 2014
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.28 KB | None | 0 0
  1. user_info = {
  2.     "trilient" => "mypass",
  3.     "admin" => "adminpass",
  4. }
  5.  
  6. puts "What is your username?"
  7.     usern = gets.chomp.downcase
  8.    
  9.     user_info.each do |username, password|
  10.         if usern == user_info[username]
  11.             puts "Enter Password"
  12.         else
  13.             puts "Incorrect username"
  14.         end
  15.     end
Advertisement
Add Comment
Please, Sign In to add comment