Licensir.TableRex.Cell.to_cell
You're seeing just the function
to_cell
, go back to Licensir.TableRex.Cell module for more information.
Specs
Converts the passed value to be a normalised %Cell{} struct.
If a non %Cell{} value is passed, this function returns a new %Cell{} struct with:
- the
rendered_value
key set to the stringified binary of the value passed in. - the
raw_value
key set to original data passed in. - any other options passed are applied over the normal struct defaults, which allows overriding alignment & color.
If a %Cell{} is passed in with no rendered_value
key, then the
raw_value
key's value is rendered and saved against it, otherwise
the Cell is passed through untouched. This is so that advanced use
cases which require direct Cell creation and manipulation are not
hindered.