Produces the given producer, then uses that producer. @see ProducerProducer for the non singleton version @api public
@api public
@api private
# File lib/puppet/pops/binder/producers.rb, line 399 def internal_produce(scope) value_producer.produce(scope) 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 [Puppet::Pops::Model::LambdaExpression] :producer_producer a producer of a value producer (required) @api public
# File lib/puppet/pops/binder/producers.rb, line 389 def initialize(injector, binding, scope, options) super p = options[:producer_producer] raise ArgumentError, "Option :producer_producer must be given in a SingletonProducerProducer" unless p @value_producer = p.produce(scope) end