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?
Return detected tput support.
Class Method Details
.detect ⇒ Tput?
Return 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 |