Sha256: 31116cd6c29c630072ffcb7494b6b195157243c803ad145777b0f25187bdd6ab

Contents?: true

Size: 964 Bytes

Versions: 32

Compression:

Stored size: 964 Bytes

Contents

# frozen_string_literal: true

module Puppet::Pops
module Types
# Marker module for implementations that are mapped to Object types
# @api public
module PuppetObject
  # Returns the Puppet Type for this instance. The implementing class must
  # add the {#_pcore_type} as a class method.
  #
  # @return [PObjectType] the type
  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

  def _pcore_all_contents(path, &block)
  end

  def _pcore_contents
  end

  def _pcore_init_hash
    {}
  end

  def to_s
    TypeFormatter.string(self)
  end
end
end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
puppet-8.10.0 lib/puppet/pops/types/puppet_object.rb
puppet-8.10.0-x86-mingw32 lib/puppet/pops/types/puppet_object.rb
puppet-8.10.0-x64-mingw32 lib/puppet/pops/types/puppet_object.rb
puppet-8.10.0-universal-darwin lib/puppet/pops/types/puppet_object.rb
puppet-8.9.0 lib/puppet/pops/types/puppet_object.rb
puppet-8.9.0-x86-mingw32 lib/puppet/pops/types/puppet_object.rb
puppet-8.9.0-x64-mingw32 lib/puppet/pops/types/puppet_object.rb
puppet-8.9.0-universal-darwin lib/puppet/pops/types/puppet_object.rb
puppet-8.8.1 lib/puppet/pops/types/puppet_object.rb
puppet-8.8.1-x86-mingw32 lib/puppet/pops/types/puppet_object.rb
puppet-8.8.1-x64-mingw32 lib/puppet/pops/types/puppet_object.rb
puppet-8.8.1-universal-darwin lib/puppet/pops/types/puppet_object.rb
puppet-8.7.0 lib/puppet/pops/types/puppet_object.rb
puppet-8.7.0-x86-mingw32 lib/puppet/pops/types/puppet_object.rb
puppet-8.7.0-x64-mingw32 lib/puppet/pops/types/puppet_object.rb
puppet-8.7.0-universal-darwin lib/puppet/pops/types/puppet_object.rb
puppet-8.6.0 lib/puppet/pops/types/puppet_object.rb
puppet-8.6.0-x86-mingw32 lib/puppet/pops/types/puppet_object.rb
puppet-8.6.0-x64-mingw32 lib/puppet/pops/types/puppet_object.rb
puppet-8.6.0-universal-darwin lib/puppet/pops/types/puppet_object.rb