Module: Fasten::Support::UI
- Included in:
- Runner
- Defined in:
- lib/fasten/support/ui.rb
Instance Method Summary collapse
Instance Method Details
#run_ui ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/fasten/support/ui.rb', line 18 def run_ui ui.update yield ensure ui.cleanup end |
#ui ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fasten/support/ui.rb', line 6 def ui require 'fasten/ui/curses' @ui ||= if ui_mode.to_s == 'curses' && $stdin.tty? && $stdout.tty? Fasten::UI::Curses.new(runner: self) else Fasten::UI::Console.new(runner: self) end rescue StandardError, LoadError @ui ||= Fasten::UI::Console.new(runner: self) end |