Method: Puppet::Pops::Types::TypedModelObject.register_ptypes

Defined in:
lib/puppet/pops/types/types.rb

.register_ptypes(loader, ir) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/puppet/pops/types/types.rb', line 57

def self.register_ptypes(loader, ir)
  types = [
    Annotation.register_ptype(loader, ir),
    RubyMethod.register_ptype(loader, ir)
  ]
  Types.constants.each do |c|
    next if c == :PType || c == :PHostClassType

    cls = Types.const_get(c)
    next unless cls.is_a?(Class) && cls < self

    type = cls.register_ptype(loader, ir)
    types << type unless type.nil?
  end
  types.each { |type| type.resolve(loader) }
end