class Stacker::Context

Defined in:

stacker/context.cr

Constructors

Class Method Summary

Instance Method Summary

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.


[View source]

Class Method Detail

def self.crinja_info #

[View source]

Instance Method Detail

def crinja_info #

[View source]
def env : Crinja #

Retrieve the Crinja runtime instance


[View source]
def root_dir : String #

Retrieve the Crinja runtime root dir


[View source]
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.


[View source]