#!/usr/local/bin/ruby
require 'rubygems'
require 'highline/import'
username = ask("Enter your username: ") { |q| q.echo = true }
password = ask("Enter your password: ") { |q| q.echo = "*" }
Here's the output on the console:
$ ruby highline.rb
Enter your username: doug
Enter your password: ******
Get it here:
HighLine
or simply install the gem the normal way:
$ sudo gem install highline
No comments:
Post a Comment