Class: Themigrator::UI
- Inherits:
-
Object
- Object
- Themigrator::UI
- Includes:
- Curses, Logger, Getchar, LogArea, ProgressWindow, TitleBar
- Defined in:
- lib/themigrator/ui.rb,
lib/themigrator/ui/getchar.rb,
lib/themigrator/ui/log_area.rb,
lib/themigrator/ui/title_bar.rb,
lib/themigrator/progress_window.rb,
lib/themigrator/ui/progress_window.rb
Defined Under Namespace
Modules: Getchar, LogArea, ProgressWindow, TitleBar
Constant Summary
Constants included from Getchar
Constants included from Logger
Instance Method Summary collapse
-
#initialize(progress_monitor) ⇒ UI
constructor
A new instance of UI.
- #start ⇒ Object
Methods included from Getchar
Methods included from ProgressWindow
#build_status_line, #pg_set_action, #progress_window, #render_progress, #say
Methods included from LogArea
#initialize_log_area, #la_append, #la_initialize?, #la_npage, #la_ppage, #la_render, #la_switch_action
Methods included from Logger
#close_logger, #init_logger, #log, #log_dir, #log_path, #logger, #main_log_path
Constructor Details
#initialize(progress_monitor) ⇒ UI
Returns a new instance of UI.
23 24 25 26 27 28 29 |
# File 'lib/themigrator/ui.rb', line 23 def initialize(progress_monitor) @pm = progress_monitor @roles = [] @current_action = '' trap "WINCH", ->(_) { resize } end |
Instance Method Details
#start ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/themigrator/ui.rb', line 31 def start init_progress_monitor init_screen Thread.new { @pm.start } Thread.new { render_loop } input_loop end |