module RakeCompilerDock::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/rake_compiler_dock/colors.rb, line 26 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/rake_compiler_dock/colors.rb, line 39 def disable_colors @colors_on = false end
enable_colors()
click to toggle source
# File lib/rake_compiler_dock/colors.rb, line 35 def enable_colors @colors_on = true end