Sha256: 92bd58a240be89928c3b2e3c5c9102282cdf7a73bf534cfc8637e9f9b3d958f3

Contents?: true

Size: 461 Bytes

Versions: 1

Compression:

Stored size: 461 Bytes

Contents

module Autotest::Clear
  VERSION = '1.1.0'

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

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

  ##
  # From autotest/growl
  # Set the label and clear the terminal.
  Autotest.add_hook :run_command do
    print LINE
    print CLEAR if @@clear_terminal
    false
  end

  Autotest.add_hook :updated do |at, updated|
    p updated if $DEBUG
    false
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
autotest-clear-1.1.0 lib/autotest/clear.rb