Class: Puppet::Util::ModuleDirectoriesAdapter Private
- Inherits:
-
Pops::Adaptable::Adapter
- Object
- Pops::Adaptable::Adapter
- Puppet::Util::ModuleDirectoriesAdapter
- Defined in:
- lib/puppet/util/autoload.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.
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.
Instance Attribute Summary collapse
- #directories ⇒ Object private
Class Method Summary collapse
- .create_adapter(env) ⇒ Object private
Methods inherited from Pops::Adaptable::Adapter
adapt, adapt_new, associate_adapter, clear, get, instance_var_name, self_attr_name, type_name
Instance Attribute Details
#directories ⇒ 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.
14 15 16 |
# File 'lib/puppet/util/autoload.rb', line 14 def directories @directories end |
Class Method Details
.create_adapter(env) ⇒ 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.
16 17 18 19 20 21 22 |
# File 'lib/puppet/util/autoload.rb', line 16 def self.create_adapter(env) adapter = super(env) adapter.directories = env.modulepath.flat_map do |dir| Dir.glob(File.join(dir, '*', 'lib')) end adapter end |