Otera.Macro (otera v0.1.0)

Copy Markdown View Source

A macro that a template defines with {% macro %}, or the caller of a {% call %} block, which has no name.

params is a list of {name, default_expr_or_nil}, special_names lists which of caller, varargs and kwargs the body uses, and frames holds the scopes around the definition, which the body can read.

Summary

Functions

Returns the attribute name of macro, like the Python Macro object of Jinja2.

Functions

get(macro, name)

@spec get(
  %Otera.Macro{
    body: term(),
    frames: term(),
    name: term(),
    params: term(),
    special_names: term()
  },
  String.t()
) :: term()

Returns the attribute name of macro, like the Python Macro object of Jinja2.