Class: Mutant::Reporter::CLI::Tput
- Inherits:
-
Object
- Object
- Mutant::Reporter::CLI::Tput
- Includes:
- Adamantium
- Defined in:
- lib/mutant/reporter/cli/tput.rb
Overview
Interface to the optionally present tput binary
Class Method Summary collapse
-
.detect ⇒ Tput?
private
Detected tput support.
Class Method Details
.detect ⇒ Tput?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Detected tput support
19 20 21 22 23 24 25 |
# File 'lib/mutant/reporter/cli/tput.rb', line 19 def self.detect reset = capture('tput reset') save = capture('tput sc') if reset restore = capture('tput rc') if save clean = capture('tput ed') || capture('tput cd') if restore new(reset + save, restore + clean) if clean end |