Module: WindowIO

Defined in:
lib/output.rb

Instance Method Summary collapse

Instance Method Details

#getchObject

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



273
274
275
# File 'lib/output.rb', line 273

def getch
  X.getch
end

#getsObject

still needs improvement



277
278
279
280
# File 'lib/output.rb', line 277

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

#p(*args) ⇒ Object



261
262
263
264
# File 'lib/output.rb', line 261

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


256
257
258
259
# File 'lib/output.rb', line 256

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

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



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

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.



251
252
253
254
# File 'lib/output.rb', line 251

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

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



266
267
268
269
# File 'lib/output.rb', line 266

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