Class: Puppet::Pops::Serialization::RGen::RGenWriter Private

Inherits:
Base
  • Object
show all
Includes:
InstanceWriter
Defined in:
lib/puppet/pops/serialization/rgen.rb

Overview

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

Instance writer for RGen::Ecore objects

Constant Summary collapse

INSTANCE =

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

RGenWriter.new

Instance Method Summary collapse

Methods inherited from Base

#features

Instance Method Details

#write(type, value, serializer) ⇒ 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.



37
38
39
40
41
42
# File 'lib/puppet/pops/serialization/rgen.rb', line 37

def write(type, value, serializer)
  impl_class = value.class
  features = features(impl_class)
  serializer.start_object(type.name, features.size)
  features.each { |feature| serializer.write(value.getGeneric(feature.name)) }
end