class Azu::Templates
- Azu::Templates
- Reference
- Object
Overview
Templates are used by Azu when rendering responses.
Since many views render significant content, for example a whole HTML file, it is common to put these files into a particular directory, typically "src/templates".
This module provides conveniences for reading all files from a particular directory and embedding them into a single module. Imagine you have a directory with templates:
Templates::Renderable will define a private function named render(template : String, data)
with
one clause per file system template.
render(template : String, data)
Defined in:
azu/templates.crConstructors
Instance Method Summary
- #crinja : Crinja
- #error_path : String
- #error_path=(path : String)
- #load(template : String)
- #path : Array(String)
- #path=(path : String)