Module: Autotest::Clear

Defined in:
lib/autotest/clear.rb

Constant Summary collapse

VERSION =
'1.1.0'
CLEAR =
"\e[2J\e[f"
LINE =
"\n"*2 + '-'*80 + "\n"*2

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.clear_terminal=(val) ⇒ Object



7
8
9
# File 'lib/autotest/clear.rb', line 7

def self.clear_terminal= val
  @@clear_terminal = val
end

Instance Method Details

#run_commandObject

From autotest/growl Set the label and clear the terminal.



15
16
17
18
19
# File 'lib/autotest/clear.rb', line 15

Autotest.add_hook :run_command do
  print LINE
  print CLEAR if @@clear_terminal
  false
end