IO ANSI Table v0.1.0 IO.ANSI.Table.Config

Defines functions to retrieve table config properties.

Summary

Functions

Checks if ANSI coloring is enabled

Retrieves the line types of a table

Retrieves the bottom margin under a table

Retrieves the left margin on the left-hand side of a table

Retrieves the top margin above a table

Functions

ansi_enabled?()
ansi_enabled?() :: boolean

Checks if ANSI coloring is enabled.

Examples

iex> alias IO.ANSI.Table.Config
iex> Config.ansi_enabled?
true
line_types()
line_types() :: [atom]

Retrieves the line types of a table.

Examples

iex> alias IO.ANSI.Table.Config
iex> Config.line_types
[:top, :header, :separator, :data, :bottom]
margin_bottom(margins)
margin_bottom(Keyword.t) :: String.t

Retrieves the bottom margin under a table.

Examples

iex> alias IO.ANSI.Table.Config
iex> Config.margin_bottom(bottom: 3)
"\n\n\n"
margin_left(margins)
margin_left(Keyword.t) :: String.t

Retrieves the left margin on the left-hand side of a table.

Examples

iex> alias IO.ANSI.Table.Config
iex> Config.margin_left(left: 2)
"  "
margin_top(margins)
margin_top(Keyword.t) :: String.t

Retrieves the top margin above a table.

Examples

iex> alias IO.ANSI.Table.Config
iex> Config.margin_top(top: 4)
"\n\n\n\n"