module Puppet::Pops::Types::PuppetObject

Marker module for implementations that are mapped to Object types @api public

Public Instance Methods

_pcore_all_contents(path, &block) click to toggle source
   # File lib/puppet/pops/types/puppet_object.rb
25 def _pcore_all_contents(path, &block)
26 end
_pcore_contents() click to toggle source
   # File lib/puppet/pops/types/puppet_object.rb
28 def _pcore_contents
29 end
_pcore_init_hash() click to toggle source
   # File lib/puppet/pops/types/puppet_object.rb
31 def _pcore_init_hash
32   {}
33 end
_pcore_type() click to toggle source

Returns the Puppet Type for this instance. The implementing class must add the {#_pcore_type} as a class method.

@return [PObjectType] the type

   # File lib/puppet/pops/types/puppet_object.rb
11 def _pcore_type
12   t = self.class._pcore_type
13   if t.parameterized?
14     unless instance_variable_defined?(:@_cached_ptype)
15       # Create a parameterized type based on the values of this instance that
16       # contains a parameter value for each type parameter that matches an
17       # attribute by name and type of value
18       @_cached_ptype = PObjectTypeExtension.create_from_instance(t, self)
19     end
20     t = @_cached_ptype
21   end
22   t
23 end
to_s() click to toggle source
   # File lib/puppet/pops/types/puppet_object.rb
35 def to_s
36   TypeFormatter.string(self)
37 end