Module: WindowIO
- Defined in:
- lib/output.rb
Instance Method Summary collapse
-
#getch ⇒ Object
FIXME These don’t/can’t honor @started flag…
-
#gets ⇒ Object
still needs improvement.
- #p(*args) ⇒ Object
- #print(*args) ⇒ Object
- #putch(ch, r: nil, c: nil, fx: nil) ⇒ Object
-
#puts(*args) ⇒ Object
Doesn’t affect STDOUT.puts, etc.
- #rcprint(r, c, *args) ⇒ Object
Instance Method Details
#getch ⇒ Object
FIXME These don’t/can’t honor @started flag…
342 343 344 |
# File 'lib/output.rb', line 342 def getch Curses.getch end |
#gets ⇒ Object
still needs improvement
346 347 348 349 |
# File 'lib/output.rb', line 346 def gets # still needs improvement recv = RubyText.started ? $stdscr : Kernel recv.gets end |
#p(*args) ⇒ Object
330 331 332 333 |
# File 'lib/output.rb', line 330 def p(*args) recv = RubyText.started ? $stdscr : Kernel recv.p(*args) end |
#print(*args) ⇒ Object
325 326 327 328 |
# File 'lib/output.rb', line 325 def print(*args) recv = RubyText.started ? $stdscr : Kernel recv.print(*args) end |
#putch(ch, r: nil, c: nil, fx: nil) ⇒ Object
351 352 353 354 355 356 |
# File 'lib/output.rb', line 351 def putch(ch, r: nil, c: nil, fx: nil) r, c = STDSCR.rc r ||= r0 c ||= c0 STDSCR.putch(ch, r: r, c: c, fx: fx) end |
#puts(*args) ⇒ Object
Doesn’t affect STDOUT.puts, etc.
320 321 322 323 |
# File 'lib/output.rb', line 320 def puts(*args) # Doesn't affect STDOUT.puts, etc. recv = RubyText.started ? $stdscr : Kernel recv.puts(*args) end |
#rcprint(r, c, *args) ⇒ Object
335 336 337 338 |
# File 'lib/output.rb', line 335 def rcprint(r, c, *args) recv = RubyText.started ? $stdscr : Kernel recv.rcprint r, c, *args end |