Module: WindowIO

Defined in:
lib/output.rb

Overview

into top level…

Instance Method Summary collapse

Instance Method Details

#getchObject

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



215
216
217
# File 'lib/output.rb', line 215

def getch
  X.getch
end

#getsObject

still needs improvement



219
220
221
222
# File 'lib/output.rb', line 219

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

#p(*args) ⇒ Object



203
204
205
206
# File 'lib/output.rb', line 203

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


198
199
200
201
# File 'lib/output.rb', line 198

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

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



224
225
226
227
228
229
# File 'lib/output.rb', line 224

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.



193
194
195
196
# File 'lib/output.rb', line 193

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

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



208
209
210
211
# File 'lib/output.rb', line 208

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