Class ZAML::Label
In: lib/puppet/util/zaml.rb
Parent: Object

Methods

counter_reset   for   new   reference   to_s  

Public Class methods

YAML only wants objects in the datastream once; if the same object

   occurs more than once, we need to emit a label ("&idxxx") on the
   first occurrence and then emit a back reference (*idxxx") on any
   subsequent occurrence(s).

To accomplish this we keeps a hash (by object id) of the labels of

   the things we serialize as we begin to serialize them.  The labels
   initially serialize as an empty string (since most objects are only
   going to be be encountered once), but can be changed to a valid
   (by assigning it a number) the first time it is subsequently used,
   if it ever is.  Note that we need to do the label setup BEFORE we
   start to serialize the object so that circular structures (in
   which we will encounter a reference to the object as we serialize
   it can be handled).

Public Instance methods

[Validate]