module Puppet::Pops::Loader::LoaderPaths

LoaderPaths

The central loader knowledge about paths, what they represent and how to instantiate from them. Contains helpers (*smart paths*) to deal with lazy resolution of paths.

TODO: Currently only supports loading of functions (3 kinds)

Public Class Methods

relative_paths_for_type(type, loader) click to toggle source

Returns an array of SmartPath, each instantiated with a reference to the given loader (for root path resolution and existence checks). The smart paths in the array appear in precedence order. The returned array may be mutated.

# File lib/puppet/pops/loader/loader_paths.rb, line 14
def self.relative_paths_for_type(type, loader)
  result =
  case type
  when :function
      [FunctionPath4x.new(loader)]
  else
    # unknown types, simply produce an empty result; no paths to check, nothing to find... move along...
    []
  end
  result
end