Sha256: cd6b194d4112ad4b6892d79c10ae1c212a94038b2fa323ccdd277232e87eaa49

Contents?: true

Size: 289 Bytes

Versions: 14

Compression:

Stored size: 289 Bytes

Contents

require "shellany/sheller"

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

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
gameboard-3.1.0 vendor/bundle/ruby/2.3.0/gems/guard-2.14.0/lib/guard/terminal.rb
gameboard-3.0.0 vendor/bundle/ruby/2.3.0/gems/guard-2.14.0/lib/guard/terminal.rb
guard-2.14.0 lib/guard/terminal.rb
mastermind_adeybee-0.1.4 vendor/bundle/ruby/2.2.0/gems/guard-2.13.0/lib/guard/terminal.rb
mastermind_adeybee-0.1.3 vendor/bundle/ruby/2.2.0/gems/guard-2.13.0/lib/guard/terminal.rb
mastermind_adeybee-0.1.2 vendor/bundle/ruby/2.2.0/gems/guard-2.13.0/lib/guard/terminal.rb
mastermind_adeybee-0.1.1 vendor/bundle/ruby/2.2.0/gems/guard-2.13.0/lib/guard/terminal.rb
geminfo-0.1.0 path/gems/guard-2.13.0/lib/guard/terminal.rb
guard-2.13.0 lib/guard/terminal.rb
guard-2.12.9 lib/guard/terminal.rb
guard-2.12.8 lib/guard/terminal.rb
guard-2.12.7 lib/guard/terminal.rb
guard-2.12.6 lib/guard/terminal.rb
guard-2.12.5 lib/guard/terminal.rb