module RubyInstaller::Build::Colors
Constants
- ColorMap
- ESC
Start an escape sequence
- NND
End the escape sequence
Public Instance Methods
colored(color, string)
click to toggle source
# File lib/ruby_installer/build/colors.rb, line 27 def colored(color, string) if @colors_on c = ColorMap[color] || color "#{ESC}#{30+c}m#{string}#{NND}" else string.dup end end
disable_colors()
click to toggle source
# File lib/ruby_installer/build/colors.rb, line 40 def disable_colors @colors_on = false end
enable_colors()
click to toggle source
# File lib/ruby_installer/build/colors.rb, line 36 def enable_colors @colors_on = true end