Module: Puppet::Pops::Loader::LoaderPaths

Defined in:
lib/puppet/pops/loader/loader_paths.rb

Overview

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)

Defined Under Namespace

Classes: FunctionPath4x, RubySmartPath, SmartPath, SmartPaths

Class Method Summary collapse

Class Method Details

.relative_paths_for_type(type, loader) ⇒ Object

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.



14
15
16
17
18
19
20
21
22
23
24
# 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