Class: Dcha::UI
- Inherits:
-
Object
- Object
- Dcha::UI
- Includes:
- Curses
- Defined in:
- lib/dcha/ui.rb,
lib/dcha/ui/window.rb
Overview
TODO: Implement ‘curses` ui :nodoc:
Defined Under Namespace
Classes: Window
Instance Method Summary collapse
-
#initialize(peer) ⇒ UI
constructor
A new instance of UI.
- #show ⇒ Object
- #update(action, _, _params, time) ⇒ Object
Constructor Details
Instance Method Details
#show ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/dcha/ui.rb', line 17 def show until @input == 'exit' parse refresh @input = @window.getstr end @window.close end |
#update(action, _, _params, time) ⇒ Object
26 27 28 29 |
# File 'lib/dcha/ui.rb', line 26 def update(action, _, _params, time) @logs.push("Execute #{action} at #{time}") refresh end |