Sha256: 5d41ceffac0ee74d8b80cf565f1f902e9028dc7716037c3990addd1d3f78683e

Contents?: true

Size: 285 Bytes

Versions: 9

Compression:

Stored size: 285 Bytes

Contents

require "guard/sheller"
module Guard
  class Terminal
    class << self
      def clear
        cmd =  Gem.win_platform? ? "cls" : "clear;"
        exit_code, _, stderr = ::Guard::Sheller.system(cmd)
        fail Errno::ENOENT, stderr unless exit_code == 0
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
guard-2.10.5 lib/guard/terminal.rb
guard-2.10.4 lib/guard/terminal.rb
guard-2.10.3 lib/guard/terminal.rb
guard-2.10.2 lib/guard/terminal.rb
guard-2.10.1 lib/guard/terminal.rb
guard-2.10.0 lib/guard/terminal.rb
guard-2.9.2 lib/guard/terminal.rb
guard-2.9.1 lib/guard/terminal.rb
guard-2.9.0 lib/guard/terminal.rb