# `IO.ANSI.Table.Spec.Headings`
[🔗](https://github.com/RaymondLoranger/io_ansi_table/blob/main/lib/io/ansi/table/spec/headings.ex#L1)

Derives the headings of a table.

# `derive_and_put`

```elixir
@spec derive_and_put(IO.ANSI.Table.Spec.t()) :: IO.ANSI.Table.Spec.t()
```

Derives the headings of a table.

## Examples

    iex> alias IO.ANSI.Table.Spec.Headings
    iex> alias IO.ANSI.Table.Spec
    iex> spec = Spec.new([:c4, :c1, :c2], sort_specs: [:c4])
    iex> %Spec{headings: headings} = Headings.derive_and_put(spec)
    iex> headings
    ["C4↑", "C1", "C2"]

    iex> alias IO.ANSI.Table.Spec.Headings
    iex> alias IO.ANSI.Table.Spec
    iex> spec = Spec.new(
    ...>   ["station_id", "wind_mph"],
    ...>   sort_specs: ["station_id"],
    ...>   header_fixes: %{"Id" => "ID", "Mph" => "MPH"}
    ...> )
    iex> %Spec{headings: headings} = Headings.derive_and_put(spec)
    iex> headings
    ["Station ID↑", "Wind MPH"]

---

*Consult [api-reference.md](api-reference.md) for complete listing*
