YuriTemplate (yuri_template v1.0.0) View Source

Delegates and convenience wrappers.

Link to this section Summary

Functions

Parses (if necessary) and expands the template.

Same as expand/2, but raises exception on error.

Link to this section Functions

Link to this function

expand(template_or_string, substitutes)

View Source

Specs

expand(String.t() | YuriTemplate.RFC6570.t(), Access.t()) ::
  {:ok, String.t()} | {:error, term()}

Parses (if necessary) and expands the template.

Parameters

  • template: the template for the expansion.

  • substitutes: mapping names to values.

Link to this function

expand!(template_or_string, substitutes)

View Source

Specs

Same as expand/2, but raises exception on error.

Specs

parse(String.t()) :: {:ok, YuriTemplate.RFC6570.t()} | {:error, term()}

See YuriTemplate.RFC6570.parse/1.