View Source Slime.Renderer (slime v1.3.1)
Transform Slime templates into HTML.
Summary
Functions
Compile Slime template to valid EEx HTML.
Takes a Slime template as a string as well as a set of bindings, and renders the resulting HTML.
Functions
Compile Slime template to valid EEx HTML.
Examples
iex> Slime.Renderer.precompile(~s(input.required type="hidden"))
"<input class=\"required\" type=\"hidden\">"
Takes a Slime template as a string as well as a set of bindings, and renders the resulting HTML.
Note that this method of rendering is substantially slower than rendering precompiled templates created with Slime.function_from_file/5 and Slime.function_from_string/5.