Module: Sai::Terminal::Capabilities Private
- Defined in:
- lib/sai/terminal/capabilities.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Detect the color capabilities of the terminal
Class Method Summary collapse
-
.detect_color_support ⇒ Integer
private
Detect the color capabilities of the current terminal.
Class Method Details
.detect_color_support ⇒ Integer
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.
Detect the color capabilities of the current terminal
24 25 26 27 28 29 30 31 32 |
# File 'lib/sai/terminal/capabilities.rb', line 24 def detect_color_support return ColorMode::NO_COLOR if no_color? return ColorMode::TRUE_COLOR if true_color? return ColorMode::ADVANCED if advanced? return ColorMode::ANSI if ansi? return ColorMode::BASIC if basic? ColorMode::NO_COLOR end |