Expresso.Presenter.Schema.Record (expresso v0.1.0)

Copy Markdown View Source

Writes a value as the array of a record form of Expresso.Presenter.Schema

A record form gives the order of the values in the array. Expresso.Test.SchemaWriter makes the converter of the script from the same form, so the renderer and the script use one order.

Summary

Functions

Return the name of each record form

Return the array of a value for a record form: the value of each field, in the order of the form

Functions

names()

@spec names() :: [atom()]

Return the name of each record form

write(name, value)

@spec write(atom(), map()) :: list()

Return the array of a value for a record form: the value of each field, in the order of the form

value is a map or a struct with a key for each field.

iex> Expresso.Presenter.Schema.Record.write(:written_property, %{
...>   entry: "fraction",
...>   name: "--fraction"
...> })
["--fraction", "fraction"]