IO.ANSI.Table.Spec (IO ANSI Table v1.0.11) View Source
Creates a table spec struct from headers and options.
Also writes data (from maps) to stdout per a table spec.
Link to this section Summary
Functions
Creates a table spec struct from headers and options.
Identifies a table spec server. Defaults to the current application name expressed as a string.
Writes data from maps to stdout per table spec and options.
Link to this section Types
Specs
t() :: %IO.ANSI.Table.Spec{
align_attrs: [IO.ANSI.Table.Header.align_attr()],
align_specs: [IO.ANSI.Table.Header.align_spec()],
bell: boolean(),
column_widths: [IO.ANSI.Table.Column.width()],
count: integer(),
header_fixes: %{optional(String.t() | Regex.t()) => String.t()},
headers: [IO.ANSI.Table.Header.t(), ...],
headings: [String.t()],
left_margin: String.t(),
margins: Keyword.t(),
max_width: pos_integer(),
rows: [IO.ANSI.Table.Row.t()],
sort_attrs: [IO.ANSI.Table.Header.sort_attr()],
sort_specs: [IO.ANSI.Table.Header.sort_spec()],
sort_symbols: [IO.ANSI.Table.Header.sort_symbol()],
spec_name: String.t(),
style: IO.ANSI.Table.Style.t()
}
Link to this section Functions
Specs
Specs
new([IO.ANSI.Table.Header.t(), ...], Keyword.t()) :: t()
Creates a table spec struct from headers and options.
Specs
Identifies a table spec server. Defaults to the current application name expressed as a string.
Examples
iex> alias IO.ANSI.Table.Spec
iex> Spec.spec_name(style: :light, count: 9, spec_name: "github_issues")
"github_issues"
iex> alias IO.ANSI.Table.Spec
iex> Spec.spec_name([])
"io_ansi_table"
Specs
write_table([Access.container()], t(), Keyword.t()) :: :ok
Writes data from maps to stdout per table spec and options.