Class: Puppet::Pops::Binder::Producers::LookupKeyProducer

Inherits:
LookupProducer show all
Defined in:
lib/puppet/pops/binder/producers.rb

Instance Attribute Summary collapse

Attributes inherited from LookupProducer

#name, #type

Attributes inherited from AbstractArgumentedProducer

#binding, #injector

Attributes inherited from Producer

#transformer

Instance Method Summary collapse

Methods inherited from Producer

#produce, #producer

Constructor Details

#initialize(injector, binder, scope, options) ⇒ LookupKeyProducer

Returns a new instance of LookupKeyProducer.

Parameters:

Options Hash (options):

Raises:

  • (ArgumentError)


360
361
362
363
364
# File 'lib/puppet/pops/binder/producers.rb', line 360

def initialize(injector, binder, scope, options)
  super
  @key = options[:key]
  raise ArgumentError, "Option 'key' must be given in a LookupKeyProducer." if key.nil?
end

Instance Attribute Details

#keyObject (readonly)



349
350
351
# File 'lib/puppet/pops/binder/producers.rb', line 349

def key
  @key
end