Class Thor::Shell::HTML
In: lib/thor/shell/html.rb
Parent: Basic

Inherit from Thor::Shell::Basic and add set_color behavior. Check Thor::Shell::Basic to see all available methods.

Methods

Constants

BOLD = "font-weight: bold"   The start of an HTML bold sequence.
BLACK = 'color: black'   Set the terminal‘s foreground HTML color to black.
RED = 'color: red'   Set the terminal‘s foreground HTML color to red.
GREEN = 'color: green'   Set the terminal‘s foreground HTML color to green.
YELLOW = 'color: yellow'   Set the terminal‘s foreground HTML color to yellow.
BLUE = 'color: blue'   Set the terminal‘s foreground HTML color to blue.
MAGENTA = 'color: magenta'   Set the terminal‘s foreground HTML color to magenta.
CYAN = 'color: cyan'   Set the terminal‘s foreground HTML color to cyan.
WHITE = 'color: white'   Set the terminal‘s foreground HTML color to white.
ON_BLACK = 'background-color: black'   Set the terminal‘s background HTML color to black.
ON_RED = 'background-color: red'   Set the terminal‘s background HTML color to red.
ON_GREEN = 'background-color: green'   Set the terminal‘s background HTML color to green.
ON_YELLOW = 'background-color: yellow'   Set the terminal‘s background HTML color to yellow.
ON_BLUE = 'background-color: blue'   Set the terminal‘s background HTML color to blue.
ON_MAGENTA = 'background-color: magenta'   Set the terminal‘s background HTML color to magenta.
ON_CYAN = 'background-color: cyan'   Set the terminal‘s background HTML color to cyan.
ON_WHITE = 'background-color: white'   Set the terminal‘s background HTML color to white.

Public Instance methods

Ask something to the user and receives a response.

Example

ask("What is your name?")

TODO: Implement ask for Thor::Shell::HTML

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.

Protected Instance methods

[Validate]