Module: RBText::Screen

Defined in:
lib/rbtext/screen.rb

Class Method Summary collapse

Class Method Details

.bellObject



23
24
25
# File 'lib/rbtext/screen.rb', line 23

def self.bell
  print "\a"
end

.clearObject



3
4
5
# File 'lib/rbtext/screen.rb', line 3

def self.clear
  print "\033[2J"
end

.clear_lineObject



7
8
9
# File 'lib/rbtext/screen.rb', line 7

def self.clear_line
  print "\033[2K"
end

.heightObject



15
16
17
# File 'lib/rbtext/screen.rb', line 15

def self.height
  self.size[0]
end

.sizeObject



11
12
13
# File 'lib/rbtext/screen.rb', line 11

def self.size
  IO.console.winsize
end

.widthObject



19
20
21
# File 'lib/rbtext/screen.rb', line 19

def self.width
  self.size[1]
end