class

Crustache::Engine

Inherits Reference / Object

Constructors

new(fs : FileSystem)
Source
new(basedir, cache = false)
Source

Instance methods

render(filename : String, model, io)
Source
render(tmpl, model, io)
Source
render(filename : String, model)

It renders a template loaded from filename with model and it returns rendered string. If filename is not found, it returns nil, but it dosen't raise an error.

Source
render(tmpl, model)
Source
render!(filename : String, model, io)
Source
render!(filename : String, model)

It is a strict version Engine#render. If filename is not found, it raise an error.

Source