MavuSnippets.SnippetCompiler.compile

You're seeing just the function compile, go back to MavuSnippets.SnippetCompiler module for more information.

Compile text with provided values.

Parameters

  • text: String or List of strings to compile.
  • values: Map of values.

Examples

iex> MavuSnippets.SnippetCompiler.compile("hello %{test}", %{"test" => "world"})
"hello world"

iex> MavuSnippets.SnippetCompiler.compile("hello %{test}", %{})
"hello %{test}"

iex> MavuSnippets.SnippetCompiler.compile(["hello %{test}", "No.%{nr}"], %{"test" => "world", "nr" => 1})
["hello world", "No.1"]