Evaluates a Puppet Expression and returns the result. This is typically used for strings with interpolated expressions. @api public
A Puppet 3 AST Expression @api public
@api private
# File lib/puppet/pops/binder/producers.rb, line 305 def internal_produce(scope) Puppet::Pops::Parser::EvaluatingParser.new.evaluate(scope, expression) end
@param injector [Puppet::Pops::Binder::Injector] The injector where the lookup originates @param binding [Puppet::Pops::Binder::Bindings::Binding, nil] The binding using this producer @param scope [Puppet::Parser::Scope] The scope to use for evaluation @option options [Puppet::Pops::Model::LambdaExpression] :transformer (nil) a transformer of produced value @option options [Array<Puppet::Pops::Model::Expression>] :expression The expression to evaluate @api public
# File lib/puppet/pops/binder/producers.rb, line 298 def initialize(injector, binding, scope, options) super @expression = options[:expression] raise ArgumentError, "Option 'expression' must be given to an EvaluatingProducer." unless @expression end