Method: Puppet::Util::Autoload.mark_loaded

Defined in:
lib/puppet/util/autoload.rb

.mark_loaded(name, file) ⇒ 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.

Save the fact that a given path has been loaded. This is so we can load downloaded plugins if they’ve already been loaded into memory.



53
54
55
56
57
58
# File 'lib/puppet/util/autoload.rb', line 53

def mark_loaded(name, file)
  name = cleanpath(name).chomp('.rb')
  file = File.expand_path(file)
  $LOADED_FEATURES << file unless $LOADED_FEATURES.include?(file)
  loaded[name] = [file, File.mtime(file)]
end