Class: Binocs::TUI::App
- Inherits:
-
Object
- Object
- Binocs::TUI::App
- Defined in:
- lib/binocs/tui/app.rb
Constant Summary collapse
- DEFAULT_REFRESH_INTERVAL =
seconds
2
Instance Attribute Summary collapse
-
#running ⇒ Object
readonly
Returns the value of attribute running.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ App
constructor
A new instance of App.
- #run ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ App
Returns a new instance of App.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/binocs/tui/app.rb', line 10 def initialize( = {}) @running = false @mode = :list # :list, :detail, :help, :filter, :search, :agents, :agent_output, :spirit_animal, :sequence, :endpoints @last_refresh = Time.now @search_buffer = '' @refresh_interval = [:refresh_interval] || DEFAULT_REFRESH_INTERVAL @agents_window = nil @agent_output_window = nil @spirit_animal_window = nil @sequence_window = nil @endpoints_window = nil @last_key = nil # Track last key for combo detection end |
Instance Attribute Details
#running ⇒ Object (readonly)
Returns the value of attribute running.
8 9 10 |
# File 'lib/binocs/tui/app.rb', line 8 def running @running end |
Instance Method Details
#run ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/binocs/tui/app.rb', line 24 def run setup_curses create_windows load_data @running = true main_loop ensure cleanup end |