class

HCL::ExpressionContext

Inherits Reference / Object

Constants

DEFAULT_FUNCTIONS = [Functions::Abs, Functions::Coalesce, Functions::Compact, Functions::Concat, Functions::Format, Functions::HasIndex, Functions::Int, Functions::JSONDecode, Functions::JSONEncode, Functions::Length, Functions::Lower, Functions::Max, Functions::Min, Functions::SetHas, Functions::SetIntersection, Functions::SetSubtract, Functions::SetSymDiff, Functions::SetUnion, Functions::Strlen, Functions::Substr, Functions::Upper]

Constructors

new(parent : ExpressionContext | Nil = nil)

Construct an empty expression context, optionally with a given parent

Source

Class methods

default_context

The default HCL expression context with all built-in default functions registered

Source

Instance methods

call_func(name, args)

Call a function defined within the current context or a parent context.

Raises HCL::FunctionUndefinedError if function is not defined. Raises HCL::ArityMismatchError if function arity is not satisfied.

Source
functions
Source
lookup_var(name)

Look up a variable starting with the current context, traversing parents until a match is found.

Raises HCL::VariableUndefinedError if variable is not defined.

Source
parent
Source
variables
Source