Hwaro::Content::Processors::TemplateEngine
Inherits Reference / Object
Template Engine wrapper for Crinja
Constructors
new
SourceInstance methods
env
Sourcerender(template_string : String, context : TemplateContext, name : String = "", filename : String | Nil = nil) : String
Render a template string with the given context. Pass name/filename
when the string came from a file so Crinja errors report file:line:col.
render(template_string : String, variables : Hash(String, Crinja::Value), name : String = "", filename : String | Nil = nil) : String
Render a template string with raw hash. Pass name/filename
when the string came from a file so Crinja errors report file:line:col.
render_template(template_name : String, context : TemplateContext) : String
Load and render a template by name
Load and render a template by name with raw hash