Class: Puppet::Pops::Binder::Producers::SingletonProducerProducer
Overview
Produces the given producer, then uses that producer.
Instance Attribute Summary collapse
- #value_producer ⇒ Object readonly
Attributes inherited from Producer
Instance Method Summary collapse
-
#initialize(injector, binding, scope, options) ⇒ SingletonProducerProducer
constructor
A new instance of SingletonProducerProducer.
Methods inherited from Producer
Constructor Details
#initialize(injector, binding, scope, options) ⇒ SingletonProducerProducer
Returns a new instance of SingletonProducerProducer.
392 393 394 395 396 397 |
# File 'lib/puppet/pops/binder/producers.rb', line 392 def initialize(injector, binding, scope, ) super p = [:producer_producer] raise ArgumentError, "Option :producer_producer must be given in a SingletonProducerProducer" unless p @value_producer = p.produce(scope) end |
Instance Attribute Details
#value_producer ⇒ Object (readonly)
383 384 385 |
# File 'lib/puppet/pops/binder/producers.rb', line 383 def value_producer @value_producer end |