Class Bee::Console::Formatter
In: lib/bee_console.rb
Parent: Object

Class to format build output on console.

Methods

Included Modules

Bee::Util::BuildErrorMixin

Constants

COLORS = [:black, :red, :green, :yellow, :blue, :magenta, :cyan, :white]   List of colors.
FOREGROUND_COLOR_CODES = { :black => 30, :red => 31, :green => 32, :yellow => 33, :blue => 34, :magenta => 35, :cyan => 36, :white => 37   Foreground color codes.
BACKGROUND_COLOR_CODES = { :black => 40, :red => 41, :green => 42, :yellow => 43, :blue => 44, :magenta => 45, :cyan => 46, :white => 47   Background color codes.
STYLES = [:reset, :bright, :dim, :underscore, :blink, :reverse, :hidden]   List of styles.
STYLE_CODES = { :reset => 0, :bright => 1, :dim => 2, :underscore => 4, :blink => 5, :reverse => 7, :hidden => 8   Style codes.
DEFAULT_STYLE = { :line_character => '-'   Default style (supposed to work on any configuration).
SHORT_STYLE_KEYS = { 'lc' => 'line_character', 'll' => 'line_length', 'ts' => 'target_style', 'tf' => 'target_foreground', 'tb' => 'target_background', 'ks' => 'task_style', 'kf' => 'task_foreground', 'kb' => 'task_background', 'ss' => 'success_style', 'sf' => 'success_foreground', 'sb' => 'success_background', 'es' => 'error_style', 'ef' => 'error_foreground', 'eb' => 'error_background'   Short style keys for command line

Public Class methods

Constructor.

  • style: style as a Hash or a String.

Public Instance methods

Format an error string.

  • string: string to format.

Format a success string.

  • string: string to format.

Format a target.

  • target: target to format.

Format a task.

  • task: task to format.

Return help about build.

  • build: running build.

Return help about task(s).

  • task: task to print help about (all tasks if nil).

Return help about template(s).

  • template: template to print help about (all templates if nil).

[Validate]