Class: Mutant::Reporter::CLI::Tput Private
- Inherits:
-
Object
- Object
- Mutant::Reporter::CLI::Tput
- Includes:
- Adamantium
- Defined in:
- lib/mutant/reporter/cli/tput.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
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
17 18 19 20 21 22 23 |
# File 'lib/mutant/reporter/cli/tput.rb', line 17 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 |