Method: Puppet::Pops::Types::PRuntimeType#class_or_module
- Defined in:
- lib/puppet/pops/types/p_runtime_type.rb
#class_or_module ⇒ 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.
69 70 71 72 73 74 75 76 77 |
# File 'lib/puppet/pops/types/p_runtime_type.rb', line 69 def class_or_module raise "Only ruby classes or modules can be produced by this runtime, got '#{runtime}" unless runtime == :ruby raise 'A pattern based Runtime type cannot produce a class or module' if @name_or_pattern.is_a?(Array) com = ClassLoader.provide(self) raise "The name #{@name_or_pattern} does not represent a ruby class or module" if com.nil? com end |