Class: Pwl::Dialog::ConsoleTextDialog
- Inherits:
-
ConsoleDialog
- Object
- Base
- ConsoleDialog
- Pwl::Dialog::ConsoleTextDialog
- Defined in:
- lib/pwl/dialog/console.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from ConsoleDialog
Methods inherited from Base
Constructor Details
This class inherits a constructor from Pwl::Dialog::ConsoleDialog
Instance Method Details
#get_input ⇒ Object
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 |