Module: CommandKit::Colors::ANSI

Defined in:
lib/wq/cli/colors_ext.rb

Constant Summary collapse

ITALICS =

ANSI code for italics text

"\e[3m"
RESET_ITALICS =

ANSI code to disable italics

"\e[23m"

Class Method Summary collapse

Class Method Details

.italics(string = nil) ⇒ String, ITALICS

Italicizes the text.

Parameters:

  • string (String, nil) (defaults to: nil)

    An optional string.

Returns:

  • (String, ITALICS)

    The italicized string or just ITALICS if no arguments were given.

See Also:



25
26
27
28
29
# File 'lib/wq/cli/colors_ext.rb', line 25

def italics(string=nil)
  if string then "#{ITALICS}#{string}#{RESET_ITALICS}"
  else           ITALICS
  end
end