Class: Guard::Terminal

Inherits:
Object
  • Object
show all
Defined in:
lib/guard/terminal.rb

Class Method Summary collapse

Class Method Details

.clearObject



6
7
8
9
10
# File 'lib/guard/terminal.rb', line 6

def clear
  cmd = Gem.win_platform? ? "cls" : "printf '\33c\e[3J';"
  exit_code, _, stderr = Shellany::Sheller.system(cmd)
  fail Errno::ENOENT, stderr unless exit_code == 0
end