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
15 def self.create_adapter(env)
16   adapter = super(env)
17   adapter.directories = env.modulepath.flat_map do |dir|
18     Dir.glob(File.join(dir, '*', 'lib'))
19   end
20   adapter
21 end