Module: WindowIO

Defined in:
lib/output.rb

Instance Method Summary collapse

Instance Method Details

#getchObject

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



201
202
203
# File 'lib/output.rb', line 201

def getch
  X.getch
end

#getsObject

still needs improvement



205
206
207
208
# File 'lib/output.rb', line 205

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

#p(*args) ⇒ Object



189
190
191
192
# File 'lib/output.rb', line 189

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


184
185
186
187
# File 'lib/output.rb', line 184

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

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



210
211
212
213
214
215
# File 'lib/output.rb', line 210

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.



179
180
181
182
# File 'lib/output.rb', line 179

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

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



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

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