ANSI color helpers. Each function wraps s in an ANSI color then a reset.
Summary
Functions
Wrap s in blue ANSI codes.
Wrap s in bright (bold) ANSI codes.
Colorize s by result status. Unknown statuses return s unchanged.
Wrap s in cyan ANSI codes.
Wrap s in green ANSI codes.
Wrap s in light-black (grey) ANSI codes.
Wrap s in red ANSI codes.
Wrap s in yellow ANSI codes.
Functions
Wrap s in blue ANSI codes.
Examples
iex> Cucumberex.Formatter.ANSI.blue("x")
IO.ANSI.blue() <> "x" <> IO.ANSI.reset()
Wrap s in bright (bold) ANSI codes.
Examples
iex> Cucumberex.Formatter.ANSI.bold("x")
IO.ANSI.bright() <> "x" <> IO.ANSI.reset()
Colorize s by result status. Unknown statuses return s unchanged.
Examples
iex> Cucumberex.Formatter.ANSI.colorize("ok", :passed) == Cucumberex.Formatter.ANSI.green("ok")
true
iex> Cucumberex.Formatter.ANSI.colorize("x", :unknown_status)
"x"
Wrap s in cyan ANSI codes.
Examples
iex> Cucumberex.Formatter.ANSI.cyan("x")
IO.ANSI.cyan() <> "x" <> IO.ANSI.reset()
Wrap s in green ANSI codes.
Examples
iex> Cucumberex.Formatter.ANSI.green("x")
IO.ANSI.green() <> "x" <> IO.ANSI.reset()
Wrap s in light-black (grey) ANSI codes.
Examples
iex> Cucumberex.Formatter.ANSI.grey("x")
IO.ANSI.light_black() <> "x" <> IO.ANSI.reset()
Wrap s in red ANSI codes.
Examples
iex> Cucumberex.Formatter.ANSI.red("x")
IO.ANSI.red() <> "x" <> IO.ANSI.reset()
Wrap s in yellow ANSI codes.
Examples
iex> Cucumberex.Formatter.ANSI.yellow("x")
IO.ANSI.yellow() <> "x" <> IO.ANSI.reset()