Sha256: 5a95a9e11236237f587b757c4df136c63101407d9b024a34bcbe19f374d9330f

Contents?: true

Size: 473 Bytes

Versions: 1

Compression:

Stored size: 473 Bytes

Contents

require "rubygems"
require "highline/import"

tounge_twister = ask("... try saying that three times fast") do |q|
  q.gather = 3
  q.verify_match = true
  q.responses[:mismatch] = "Nope, those don't match. Try again."
end

puts "Ok, you did it."

pass = ask("Enter your password:  ") do |q|
  q.echo = '*'
  q.verify_match = true
  q.gather = {"Enter a password" => '',
              "Please type it again for verification" => ''}
end

puts "Your password is now #{pass}!"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
highline-sgonyea-1.6.12 examples/repeat_entry.rb