class Puppet::Util::ModuleDirectoriesAdapter

An adapter that ties the module_directories cache to the environment where the modules are parsed. This adapter ensures that the life-cycle of this cache doesn't exceed the life-cycle of the environment.

@api private

Attributes

directories[RW]

Public Class Methods

create_adapter(env) click to toggle source
   # File lib/puppet/util/autoload.rb
14 def self.create_adapter(env)
15   adapter = super(env)
16   adapter.directories = env.modulepath.flat_map do |dir|
17     Dir.glob(File.join(dir, '*', 'lib'))
18   end
19   adapter
20 end