Class: Bolt::PAL::YamlPlan::CodeLiteral

Inherits:
EvaluableString show all
Defined in:
lib/bolt/pal/yaml_plan.rb

Overview

This represents a literal snippet of Puppet code

Instance Attribute Summary

Attributes inherited from EvaluableString

#value

Instance Method Summary collapse

Methods inherited from EvaluableString

#==, #initialize

Constructor Details

This class inherits a constructor from Bolt::PAL::YamlPlan::EvaluableString

Instance Method Details

#evaluate(scope, evaluator) ⇒ Object



129
130
131
132
133
134
135
# File 'lib/bolt/pal/yaml_plan.rb', line 129

def evaluate(scope, evaluator)
  parse_result = evaluator.parse_string(@value)

  scope.with_local_scope({}) do
    evaluator.evaluate(scope, parse_result)
  end
end