Class: Puppet::Pops::Lookup::LookupKeyFunctionProvider Private
- Inherits:
-
FunctionProvider
- Object
- FunctionProvider
- Puppet::Pops::Lookup::LookupKeyFunctionProvider
- Defined in:
- lib/puppet/pops/lookup/lookup_key_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.
Direct Known Subclasses
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.
'lookup_key'.freeze
Instance Attribute Summary
Attributes inherited from FunctionProvider
#function_name, #locations, #parent_data_provider
Instance Method Summary collapse
- #label ⇒ Object private
-
#unchecked_key_lookup(key, lookup_invocation, merge) ⇒ Object
private
Performs a lookup with the assumption that a recursive check has been made.
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
#label ⇒ 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.
32 33 34 |
# File 'lib/puppet/pops/lookup/lookup_key_function_provider.rb', line 32 def label 'Lookup Key' end |
#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.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/puppet/pops/lookup/lookup_key_function_provider.rb', line 16 def unchecked_key_lookup(key, lookup_invocation, merge) lookup_invocation.with(:data_provider, self) do MergeStrategy.strategy(merge).lookup(locations, lookup_invocation) do |location| if location.nil? value = lookup_key(key.root_key, lookup_invocation, nil, merge) lookup_invocation.report_found(key.root_key, validate_data_value(self, value)) else lookup_invocation.with(:location, location) do value = lookup_key(key.root_key, lookup_invocation, location.location, merge) lookup_invocation.report_found(key.root_key, validate_data_value(self, value)) end end end end end |