class BBSTerm

Public Instance Methods

init_buffer() click to toggle source
# File bin/iqterm, line 59
def init_buffer
  @read_buffer = ""
end
post_init() click to toggle source
# File bin/iqterm, line 54
def post_init
  @initialization = true
  init_buffer
end
receive_data(data) click to toggle source
# File bin/iqterm, line 63
def receive_data(data)
  @read_buffer += data.force_encoding(Encoding::IBM437).encode(Encoding::UTF_8)

  if @initialization and @read_buffer =~ /\e\[6n/
    @initialization = false
    send_data "\e[6n\r\n"
  end

  @read_buffer.gsub!(/\r\n/, "\n")
  print @read_buffer

  init_buffer
end