Module: WindowIO

Defined in:
lib/output.rb

Instance Method Summary collapse

Instance Method Details

#getchObject

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



323
324
325
# File 'lib/output.rb', line 323

def getch
  Curses.getch
end

#getsObject

still needs improvement



327
328
329
330
# File 'lib/output.rb', line 327

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

#p(*args) ⇒ Object



311
312
313
314
# File 'lib/output.rb', line 311

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


306
307
308
309
# File 'lib/output.rb', line 306

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

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



332
333
334
335
336
337
# File 'lib/output.rb', line 332

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.



301
302
303
304
# File 'lib/output.rb', line 301

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

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



316
317
318
319
# File 'lib/output.rb', line 316

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