class Pwl::Dialog::ConsolePasswordDialog
Public Class Methods
new(prompt = 'Please enter the master password:')
click to toggle source
Calls superclass method
Pwl::Dialog::ConsoleDialog::new
# File lib/pwl/dialog/console.rb, line 16 def initialize(prompt = 'Please enter the master password:') super(prompt) end
Public Instance Methods
get_input()
click to toggle source
# File lib/pwl/dialog/console.rb, line 20 def get_input begin STDIN.tty? ? @dialog.ask(prompt){|q| q.echo = "*"} : STDIN.read.chomp rescue Interrupt raise Cancelled.new(1) end end