Skip to content

Instantly share code, notes, and snippets.

@felipeelias
Created April 11, 2011 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felipeelias/913582 to your computer and use it in GitHub Desktop.
Save felipeelias/913582 to your computer and use it in GitHub Desktop.
Ask for username and password
require 'highline'
prompt = HighLine.new
prompt.say("Hello!")
username = prompt.ask("Tell me your username: ")
password = prompt.ask("And now your password: ") { |options| options.echo = false }
prompt.say("Thanks #{username}! bye")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment