Class: Pwl::Dialog::ConsoleTextDialog

Inherits:
ConsoleDialog show all
Defined in:
lib/pwl/dialog/console.rb

Instance Attribute Summary

Attributes inherited from Base

#prompt, #title

Instance Method Summary collapse

Methods inherited from ConsoleDialog

#initialize

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Pwl::Dialog::ConsoleDialog

Instance Method Details

#get_inputObject



30
31
32
33
34
35
36
# File 'lib/pwl/dialog/console.rb', line 30

def get_input
  begin
    STDIN.tty? ? @dialog.ask(prompt) : STDIN.read.chomp
  rescue Interrupt
    raise Cancelled.new(1)
  end
end