Macaw.Layers.Words (macaw_layers v0.6.0)

Copy Markdown View Source

The words for macaw_layers' own fault reasons (spec/01 §3): limits, URLs, unsafe text, colors, tags and stores, and its own leaf types inside {:type, type}.

Macaw.Base.Fault words the general reasons every package shares and takes a package's words as words:, tried first. This is layers' function for that option:

iex> Macaw.Base.Fault.format({[:bytes], {:limit, :bytes, 10, 12}}, words: &Macaw.Layers.Words.words/1)
"bytes: is 12 bytes; the limit bytes is 10"
iex> Macaw.Base.Fault.format({[:fill], {:type, {:list, :color_value}}}, words: &Macaw.Layers.Words.words/1)
"fill: must be a list of a color value: color(name), ramp(name, t), {:series, i}, a literal %Macaw.Layers.Color{} or a transform of them"

words/1 answers nil for a reason that isn't layers' own, a general one included, so base words it.

Summary

Functions

A layers reason's words, or nil for a reason that isn't layers' own.

Functions

words(arg1)

@spec words(term()) :: String.t() | nil

A layers reason's words, or nil for a reason that isn't layers' own.