Module: WindowIO

Defined in:
lib/output.rb

Overview

into top level…

Instance Method Summary collapse

Instance Method Details

#getchObject



162
163
164
# File 'lib/output.rb', line 162

def getch
  X.getch
end

#getsObject

still needs improvement



166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/output.rb', line 166

def gets  # still needs improvement
  str = ""
  loop do
    ch = ::STDSCR.getch
    if ch == 10
      ::STDSCR.crlf
      break 
    end
    str << ch
  end
  str
end

#p(*args) ⇒ Object



154
155
156
# File 'lib/output.rb', line 154

def p(*args)
  $stdscr.p(*args)
end


150
151
152
# File 'lib/output.rb', line 150

def print(*args)
  $stdscr.print(*args)
end

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



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

def putch(ch, r: nil, c: nil, fx: nil)
  $stdscr.putch(ch, r: r, c: c, fx: fx)
end

#puts(*args) ⇒ Object

Doesn’t affect STDOUT.puts, etc.



146
147
148
# File 'lib/output.rb', line 146

def puts(*args)       # Doesn't affect STDOUT.puts, etc.
  $stdscr.puts(*args)
end

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



158
159
160
# File 'lib/output.rb', line 158

def rcprint(r, c, *args)
  $stdscr.rcprint r, c, *args
end