table_rex v0.3.0 TableRex.Cell

Defines a struct that represents a single table cell, and helper functions.

Summary

Functions

Converts the passed value to be a normalised %Cell{} struct

Types

t :: %TableRex.Cell{align: term, value: term}

Functions

to_cell(cell)

Specs

Converts the passed value to be a normalised %Cell{} struct.

If a non %Cell{} struct is passed, this function returns a new %Cell{} struct with the value key set to the stringified binary of the content passed in and any options passed are applied over the normal struct defaults.

If a %Cell{} is passed in those with a binary entry for their value key will pass straight through; all others will have their value key stringified before being passed through.

to_cell(value, opts \\ [])

Specs

to_cell(any, list) :: TableRex.Cell.t