Module: RubyInstaller::Build::Colors
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/ruby_installer/build/colors.rb |
Constant Summary
-
ColorMap =
# File 'lib/ruby_installer/build/colors.rb', line 10{ black: 0, red: 1, green: 2, yellow: 3, blue: 4, magenta: 5, cyan: 6, white: 7, }
-
ESC =
Start an escape sequence
"\e["
-
NND =
End the escape sequence
"#{ESC}0m"
Class Method Summary
- .colored(color, string) mod_func
- .disable_colors mod_func
- .enable_colors mod_func
- .initialize(*_, **_) mod_func
Class Method Details
.colored(color, string) (mod_func)
[ GitHub ].disable_colors (mod_func)
[ GitHub ]# File 'lib/ruby_installer/build/colors.rb', line 48
def disable_colors @colors_on = false end
.enable_colors (mod_func)
[ GitHub ]# File 'lib/ruby_installer/build/colors.rb', line 44
def enable_colors @colors_on = true end
.initialize(*_, **_) (mod_func)
[ GitHub ]# File 'lib/ruby_installer/build/colors.rb', line 29
def initialize(*_, **_) super @colors_on = nil end