Class: Puppet::Pops::Binder::Producers::AbstractValueProducer Abstract

Inherits:
Producer
  • Object
show all
Defined in:
lib/puppet/pops/binder/producers.rb

Overview

This class is abstract.

Abstract Producer holding a value

Direct Known Subclasses

DeepCloningProducer, SingletonProducer

Instance Attribute Summary collapse

Attributes inherited from Producer

#transformer

Instance Method Summary collapse

Methods inherited from Producer

#produce, #producer

Constructor Details

#initialize(injector, binding, scope, options) ⇒ AbstractValueProducer

Returns a new instance of AbstractValueProducer.

Parameters:

  • injector (Injector)

    The injector where the lookup originates

  • binding (Bindings::Binding, nil)

    The binding using this producer

  • scope (Puppet::Parser::Scope)

    The scope to use for evaluation

  • options (Hash)

    a customizable set of options

Options Hash (options):



136
137
138
139
140
# File 'lib/puppet/pops/binder/producers.rb', line 136

def initialize(injector, binding, scope, options)
  super
  # nil is ok here, as an abstract value producer may be used to signal "not found"
  @value = options[:value]
end

Instance Attribute Details

#valueObject (readonly)



127
128
129
# File 'lib/puppet/pops/binder/producers.rb', line 127

def value
  @value
end