Inherit from Thor::Shell::Basic and add set_color behavior. Check Thor::Shell::Basic to see all available methods.
Embed in a String to clear all previous ANSI sequences.
The start of an ANSI bold sequence.
Set the terminal’s foreground ANSI color to black.
Set the terminal’s foreground ANSI color to red.
Set the terminal’s foreground ANSI color to green.
Set the terminal’s foreground ANSI color to yellow.
Set the terminal’s foreground ANSI color to blue.
Set the terminal’s foreground ANSI color to magenta.
Set the terminal’s foreground ANSI color to cyan.
Set the terminal’s foreground ANSI color to white.
Set the terminal’s background ANSI color to black.
Set the terminal’s background ANSI color to red.
Set the terminal’s background ANSI color to green.
Set the terminal’s background ANSI color to yellow.
Set the terminal’s background ANSI color to blue.
Set the terminal’s background ANSI color to magenta.
Set the terminal’s background ANSI color to cyan.
Set the terminal’s background ANSI color to white.
Set color by using a string or one of the defined constants. If a third option is set to true, it also adds bold to the string. This is based on Highline implementation and it automatically appends CLEAR to the end of the returned String.
# File lib/bundler/vendor/thor/shell/color.rb, line 53 53: def set_color(string, color, bold=false) 54: color = self.class.const_get(color.to_s.upcase) if color.is_a?(Symbol) 55: bold = bold ? BOLD : "" 56: "#{bold}#{color}#{string}#{CLEAR}" 57: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.