Module: WindowIO

Defined in:
lib/output.rb

Instance Method Summary collapse

Instance Method Details

#getchObject

FIXME These don’t/can’t honor @started flag…



304
305
306
# File 'lib/output.rb', line 304

def getch
  Curses.getch
end

#getsObject

still needs improvement



308
309
310
311
# File 'lib/output.rb', line 308

def gets  # still needs improvement
  recv = RubyText.started ? $stdscr : Kernel
  recv.gets
end

#p(*args) ⇒ Object



292
293
294
295
# File 'lib/output.rb', line 292

def p(*args)
  recv = RubyText.started ? $stdscr : Kernel
  recv.p(*args)
end


287
288
289
290
# File 'lib/output.rb', line 287

def print(*args)
  recv = RubyText.started ? $stdscr : Kernel
  recv.print(*args)
end

#putch(ch, r: nil, c: nil, fx: nil) ⇒ Object



313
314
315
316
317
318
# File 'lib/output.rb', line 313

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.



282
283
284
285
# File 'lib/output.rb', line 282

def puts(*args)       # Doesn't affect STDOUT.puts, etc.
  recv = RubyText.started ? $stdscr : Kernel
  recv.puts(*args)
end

#rcprint(r, c, *args) ⇒ Object



297
298
299
300
# File 'lib/output.rb', line 297

def rcprint(r, c, *args)
  recv = RubyText.started ? $stdscr : Kernel
  recv.rcprint r, c, *args
end