module Screen

Public Instance Methods

clear!() click to toggle source
# File lib/screen.rb, line 4
def clear!
  print "\e[2J\e[f"
end
height() click to toggle source
# File lib/screen.rb, line 12
def height
  `tput lines`.to_i
end
hide_cursor() click to toggle source
# File lib/screen.rb, line 8
def hide_cursor
  print "\e[#{height};#{width}H"
end
print(text) click to toggle source
suggest(x, y) click to toggle source
# File lib/screen.rb, line 20
def suggest(x, y)
  y.times do |n|
    print "\n" if n.nonzero?
    print "\u2588" * x
  end
end
width() click to toggle source
# File lib/screen.rb, line 27
def width
  `tput cols`.to_i
end