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

Derives the sort attributes of a table.

# `derive_and_put`

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

Derives the sort attributes of a table.

## Examples

    iex> alias IO.ANSI.Table.Spec.SortAttrs
    iex> alias IO.ANSI.Table.Spec
    iex> spec = Spec.new([:c4, :c1, :c2], sort_specs: [desc: :c2])
    iex> %Spec{sort_attrs: sort_attrs} = SortAttrs.derive_and_put(spec)
    iex> sort_attrs
    [nil, nil, :desc]

---

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