class Rscreen
Public Class Methods
clear_line(mode=2)
click to toggle source
# File lib/rubterm_string.rb, line 544 def self.clear_line(mode=2) case mode when 0, :to_end print "\u001b[0K" return mode when 1, :to_start print "\u001b[1K" return mode when 2, :full print "\u001b[2K" return mode else return false end end
clear_screen(mode=2)
click to toggle source
# File lib/rubterm_string.rb, line 521 def self.clear_screen(mode=2) case mode when 0, :to_end print "\u001b[0J" return mode when 1, :to_start print "\u001b[1J" return mode when 2, :full print "\u001b[2J" return mode else return false end end
draw(text)
click to toggle source
# File lib/rubterm_string.rb, line 567 def self.draw(text) counter = 0 print "\u001b[s" text.split("").each do |x| x = " " if x == "\n" or x == "\r" print x if counter == 0 if counter != 0 print "\u001b[#{counter}C" print x end print "\u001b[u" counter+=1 end print "\u001b[u" end