Incant.Naming (incant v0.1.0)

Copy Markdown

Configurable naming for inferred Incant labels and titles.

Explicit DSL labels and titles always take precedence. The vocabulary only applies when Incant must infer display text from an identifier.

Summary

Functions

Returns the naming options declared by an admin metadata value.

Returns a sentence-style inferred label.

Resolves inferred labels throughout a portable admin contract.

Returns a title-style inferred title.

Types

config()

@type config() :: keyword() | map()

style()

@type style() :: :sentence | :title

Functions

for_admin(arg1)

@spec for_admin(term()) :: config()

Returns the naming options declared by an admin metadata value.

label(value, naming \\ [])

@spec label(term(), config()) :: String.t()

Returns a sentence-style inferred label.

resolve_contract(contract, naming \\ [])

@spec resolve_contract(Incant.Admin.Contract.t(), config()) ::
  Incant.Admin.Contract.t()

Resolves inferred labels throughout a portable admin contract.

title(value, naming \\ [])

@spec title(term(), config()) :: String.t()

Returns a title-style inferred title.