Class: Window
Instance Method Summary collapse
-
#initialize(client) ⇒ Window
constructor
A new instance of Window.
- #new_message(message) ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(client) ⇒ Window
Returns a new instance of Window.
6 7 8 9 |
# File 'lib/backchannel/window.rb', line 6 def initialize(client) @client = client @messages = [] end |
Instance Method Details
#new_message(message) ⇒ Object
24 25 26 27 |
# File 'lib/backchannel/window.rb', line 24 def () @messages << redraw end |
#start ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/backchannel/window.rb', line 11 def start init_screen start_color init_pair(COLOR_WHITE, COLOR_BLACK, COLOR_WHITE) redraw @client.(self) loop do capture_input end end |