snor v0.1.0 Snor

TODO: Documentation for Snor.

Link to this section Summary

Functions

Render a given template to a string. The second parameter is the map that contains the data to use for interpolation. The third parameter is the module to use for looking up the helper functions.

Link to this section Functions

Link to this function

render(string, data \\ %{}, helpers \\ Snor.Helpers)

render(String.t(), map(), module()) :: String.t()

Render a given template to a string. The second parameter is the map that contains the data to use for interpolation. The third parameter is the module to use for looking up the helper functions.

Examples

iex> Snor.render("Hello {{name}}", %{name: "World"})
"Hello World"
iex> Snor.render("Hello")
"Hello"