Class: Puppet::Pops::Types::ClassLoader Private
- Defined in:
- lib/puppet/pops/types/class_loader.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.
This means it can load a class from a gem, or from puppet modules.
Class Method Summary collapse
-
.provide(name) ⇒ Class?
Returns a Class given a fully qualified class name.
Class Method Details
.provide(name) ⇒ Class?
Returns a Class given a fully qualified class name. Lookup of class is never relative to the calling namespace.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/puppet/pops/types/class_loader.rb', line 19 def self.provide(name) case name when String provide_from_string(name) when Array provide_from_name_path(name.join('::'), name) when PAnyType, PTypeType provide_from_type(name) else raise ArgumentError, "Cannot provide a class from a '#{name.class.name}'" end end |