class
Stacker::Context
- Stacker::Context
- Reference
- Object
Defined in:
stacker/context.crConstructors
Class Method Summary
Instance Method Summary
- #crinja_info
-
#env : Crinja
Retrieve the
Crinjaruntime instance -
#root_dir : String
Retrieve the
Crinjaruntime root dir -
#template(file : String) : Crinja::Template
Return the parsed template for file, parsing it only when it is unknown or has changed on disk.
Constructor Detail
def self.new(root_dir : String)
#
Context is a wrapper around Crinja.
It creates and setup a new Crinja environment to compile Jinja templates.
Filters and functions defined under src/runtime will be
automaticaly loaded.
Class Method Detail
Instance Method Detail
def template(file : String) : Crinja::Template
#
Return the parsed template for file, parsing it only when it is unknown or has changed on disk.
Parsing accounts for a significant share of a stack build (measured at ~38% of the render time), and pillar templates change far less often than they are rendered.