Module: Ci::Ansi2html

Defined in:
lib/ci/ansi2html.rb

Defined Under Namespace

Classes: Converter

Constant Summary collapse

COLOR =

keys represent the trailing digit in color changing command (30-37, 40-47, 90-97. 100-107)

{
  0 => 'black', # not that this is gray in the intense color table
  1 => 'red',
  2 => 'green',
  3 => 'yellow',
  4 => 'blue',
  5 => 'magenta',
  6 => 'cyan',
  7 => 'white', # not that this is gray in the dark (aka default) color table
}
STYLE_SWITCHES =
{
  bold:       0x01,
  italic:     0x02,
  underline:  0x04,
  conceal:    0x08,
  cross:      0x10,
}

Class Method Summary collapse

Class Method Details

.convert(ansi) ⇒ Object


26
27
28
# File 'lib/ci/ansi2html.rb', line 26

def self.convert(ansi)
  Converter.new().convert(ansi)
end