class Puppet::Pops::Binder::Producers::LookupProducer

@api public

Attributes

name[R]

@api public

type[R]

@api public

Protected Instance Methods

internal_produce(scope) click to toggle source

@api private

# File lib/puppet/pops/binder/producers.rb, line 337
def internal_produce(scope)
  injector.lookup_type(scope, type, name)
end

Public Class Methods

new(injector, binder, scope, options) click to toggle source

@param injector [Puppet::Pops::Binder::Injector] The injector where the lookup originates @param binder [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::Types::PAnyType] :type The type to lookup @option options [String] :name (”) The name to lookup @api public

# File lib/puppet/pops/binder/producers.rb, line 327
def initialize(injector, binder, scope, options)
  super
  @type = options[:type]
  @name = options[:name] || ''
  raise ArgumentError, "Option 'type' must be given in a LookupProducer." unless @type
end