class Puppet::Pops::Binder::Injector::Private::NullInjectorImpl

This is a mocking “Null” implementation of Injector. It never finds anything @api private

Attributes

entries[R]
key_factory[R]
type_calculator[R]

Public Instance Methods

binder() click to toggle source

@api private

# File lib/puppet/pops/binder/injector.rb, line 378
def binder
  nil
end
get_contributions() click to toggle source
# File lib/puppet/pops/binder/injector.rb, line 402
def get_contributions()
  []
end
lookup(scope, *args, &block) click to toggle source
# File lib/puppet/pops/binder/injector.rb, line 360
def lookup(scope, *args, &block)
  raise ArgumentError, "lookup should be called with two or three arguments, got: #{args.size()+1}" unless args.size.between?(1,2)
  # call block with result if given
  if block
    case block.arity
    when 1
      block.call(nil)
    when 2
      block.call(scope, nil)
    else
      raise ArgumentError, "The block should have arity 1 or 2"
    end
  else
    val
  end
end
lookup_key(scope, key) click to toggle source

@api private

# File lib/puppet/pops/binder/injector.rb, line 383
def lookup_key(scope, key)
  nil
end
lookup_producer(scope, *args, &block) click to toggle source

@api private

# File lib/puppet/pops/binder/injector.rb, line 388
def lookup_producer(scope, *args, &block)
  lookup(scope, *args, &block)
end
lookup_producer_key(scope, key) click to toggle source

@api private

# File lib/puppet/pops/binder/injector.rb, line 393
def lookup_producer_key(scope, key)
  nil
end
lookup_producer_type(scope, type, name='') click to toggle source

@api private

# File lib/puppet/pops/binder/injector.rb, line 398
def lookup_producer_type(scope, type, name='')
  nil
end

Public Class Methods

new() click to toggle source
# File lib/puppet/pops/binder/injector.rb, line 354
def initialize
  @entries = []
  @key_factory = Puppet::Pops::Binder::KeyFactory.new()
  @type_calculator = @key_factory.type_calculator
end