Module: Puppet::Pops::Serialization::InstanceReader Private

Included in:
ObjectReader
Defined in:
lib/puppet/pops/serialization/instance_reader.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

An InstanceReader is responsible for reading an instance of a complex object using a deserializer. The read involves creating the instance, register it with the deserializer (so that self references can be resolved) and then read the instance data (which normally amounts to all attribute values). Instance readers are registered with of Types::PObjectTypes to aid the type when reading instances.

Instance Method Summary collapse

Instance Method Details

#read(impl_class, value_count, deserializer) ⇒ 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.

Returns the instance that has been read.

Parameters:

  • impl_class (Class)

    the class of the instance to be created and initialized

  • value_count (Integer)

    the expected number of objects that forms the initialization data

  • deserializer (Deserializer)

    the deserializer to read from, and to register the instance with

Returns:

  • (Object)

    the instance that has been read



14
15
16
# File 'lib/puppet/pops/serialization/instance_reader.rb', line 14

def read(impl_class, value_count, deserializer)
  Serialization.not_implemented(self, 'read')
end