Module: Puppet::Pops::Types::PuppetObject
- Included in:
- Lookup::Context, Model::PopsObject, Parser::Locator::Locator19, Pcore, Resource::Param, Resource::ResourceTypeImpl, Annotation, TypedModelObject
- Defined in:
- lib/puppet/pops/types/puppet_object.rb
Instance Method Summary collapse
- #_pcore_all_contents(path, &block) ⇒ Object
- #_pcore_contents ⇒ Object
- #_pcore_init_hash ⇒ Object
-
#_pcore_type ⇒ PObjectType
Returns the Puppet Type for this instance.
- #to_s ⇒ Object
Instance Method Details
#_pcore_all_contents(path, &block) ⇒ Object
26 27 |
# File 'lib/puppet/pops/types/puppet_object.rb', line 26 def _pcore_all_contents(path, &block) end |
#_pcore_contents ⇒ Object
29 30 |
# File 'lib/puppet/pops/types/puppet_object.rb', line 29 def _pcore_contents end |
#_pcore_init_hash ⇒ Object
32 33 34 |
# File 'lib/puppet/pops/types/puppet_object.rb', line 32 def _pcore_init_hash {} end |
#_pcore_type ⇒ PObjectType
Returns the Puppet Type for this instance. The implementing class must add the #_pcore_type as a class method.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/puppet/pops/types/puppet_object.rb', line 12 def _pcore_type t = self.class._pcore_type if t.parameterized? unless instance_variable_defined?(:@_cached_ptype) # Create a parameterized type based on the values of this instance that # contains a parameter value for each type parameter that matches an # attribute by name and type of value @_cached_ptype = PObjectTypeExtension.create_from_instance(t, self) end t = @_cached_ptype end t end |
#to_s ⇒ Object
36 37 38 |
# File 'lib/puppet/pops/types/puppet_object.rb', line 36 def to_s TypeFormatter.string(self) end |