Method: Puppet::Util::Autoload#initialize

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

#initialize(obj, path) ⇒ Autoload

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.

Returns a new instance of Autoload.

Raises:

  • (ArgumentError)


175
176
177
178
179
# File 'lib/puppet/util/autoload.rb', line 175

def initialize(obj, path)
  @path = path.to_s
  raise ArgumentError, _("Autoload paths cannot be fully qualified") if Puppet::Util.absolute_path?(@path)
  @object = obj
end