Class: Puppet::Pops::Lookup::DataHashFunctionProvider Private

Inherits:
FunctionProvider show all
Includes:
Interpolation, SubLookup
Defined in:
lib/puppet/pops/lookup/data_hash_function_provider.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

API:

  • private

Constant Summary collapse

TAG =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

API:

  • private

'data_hash'.freeze

Constants included from SubLookup

SubLookup::SPECIAL

Instance Attribute Summary

Attributes inherited from FunctionProvider

#function_name, #locations, #parent_data_provider

Instance Method Summary collapse

Methods included from Interpolation

#interpolate

Methods included from SubLookup

#split_key, #sub_lookup

Methods inherited from FunctionProvider

#function_context, #initialize, #module_name, #name, #options, #to_s

Methods included from DataProvider

ensure_types_initialized, #key_lookup, key_type, #lookup, #module_name, #name, #validate_data_entry, #validate_data_hash, #validate_data_value, value_type

Constructor Details

This class inherits a constructor from Puppet::Pops::Lookup::FunctionProvider

Instance Method Details

#unchecked_key_lookup(key, lookup_invocation, merge) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Performs a lookup with the assumption that a recursive check has been made.

Parameters:

  • The key to lookup

  • The current lookup invocation

  • Merge strategy, merge strategy name, strategy and options hash, or nil (implies “first found”)

Returns:

  • the found object

API:

  • private



20
21
22
23
24
25
26
27
# File 'lib/puppet/pops/lookup/data_hash_function_provider.rb', line 20

def unchecked_key_lookup(key, lookup_invocation, merge)
  root_key = key.root_key
  lookup_invocation.with(:data_provider, self) do
    MergeStrategy.strategy(merge).lookup(locations, lookup_invocation) do |location|
      invoke_with_location(lookup_invocation, location, root_key)
    end
  end
end