Method: CLI::UI::Color#initialize
- Defined in:
- lib/cli/ui/color.rb
#initialize(sgr, name) ⇒ Color
Creates a new color mapping Signatures can be found here: en.wikipedia.org/wiki/ANSI_escape_code#Colors
Attributes
-
sgr- The color signature -
name- The name of the color
17 18 19 20 21 |
# File 'lib/cli/ui/color.rb', line 17 def initialize(sgr, name) @sgr = sgr @code = CLI::UI::ANSI.sgr(sgr) @name = name end |