class
HCL::ExpressionContext
Defined in:
hcl/expression_context.crConstant Summary
-
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
Class Method Summary
-
.default_context
The default HCL expression context with all built-in default functions registered
Instance Method Summary
-
#call_func(name, args)
Call a function defined within the current context or a parent context.
- #functions : Hash(String, HCL::Function)
-
#lookup_var(name)
Look up a variable starting with the current context, traversing parents until a match is found.
- #parent : HCL::ExpressionContext?
- #variables : Hash(String, HCL::Any)
Instance methods inherited from class Reference
==(other : HCL::Any)
==
Instance methods inherited from class Object
===(other : HCL::Any)
===
Class methods inherited from class Object
from_hcl(string_or_io : String | IO, ctx : HCL::ExpressionContext = HCL::ExpressionContext.default_context)
from_hcl
Constructor Detail
Construct an empty expression context, optionally with a given parent
Class Method Detail
The default HCL expression context with all built-in default functions registered
Instance Method Detail
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.
Look up a variable starting with the current context, traversing parents until a match is found.
Raises HCL::VariableUndefinedError
if variable is not defined.