module

Krikri::VariableSubstitutor::Rerender

Constants

MAX_RETEMPLATING_DEPTH = 50

Class methods

enter_retemplating

Manual enter/exit pair for call sites whose body can't be a block (VarSubstitutor#substitute_impl wraps a long multi-return body in a method-level ensure instead).

Source
exit_retemplating
Source
if_templated(vars : Hash(String, JSON::Any) | Nil, value : JSON::Any | Nil) : JSON::Any | Nil
Source
render_raw(vars : Hash(String, JSON::Any), raw : String) : String

Renders raw (known to contain {{) back to its real value: one whole-string span -> ExpressionEvaluator (preserves result types); anything else -> full substitution.

Source
with_depth_guard

Runs block under the re-templating depth guard. Every entry point that re-renders a variable's own unrendered {{ }} value must go through this - a cycle can re-enter through any of them (Rerender.if_templated, VariableLookup#rerender_if_templated, VarSubstitutor#substitute), so the counter has to be shared.

Source