Module: Screen

Defined in:
lib/screen.rb

Overview

Module containing class methods for clearing and resetting a terminal screen.

Class Method Summary collapse

Class Method Details

.clearObject

Method that uses console code to clear the screen.

Returns nothing.



29
30
31
# File 'lib/screen.rb', line 29

def self.clear
  print "\e[H\e[2J"
end

.resetObject

Method that uses console code to move cursor to 1,1 coordinate.

Returns nothing.



36
37
38
# File 'lib/screen.rb', line 36

def self.reset
  print "\e[1;1H"
end