Class: Puppet::Pops::Serialization::Extension::MapStart
- Includes:
- NotTabulated, SequenceStart
- Defined in:
- lib/puppet/pops/serialization/extension.rb
Overview
The class that triggers the use of the MAP_START extension. The payload is the map size (number of entries)
Instance Attribute Summary collapse
- #size ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(size) ⇒ MapStart
constructor
A new instance of MapStart.
-
#sequence_size ⇒ Object
Sequence size is twice the map size since each entry is written as key and value.
Constructor Details
#initialize(size) ⇒ MapStart
Returns a new instance of MapStart.
64 65 66 |
# File 'lib/puppet/pops/serialization/extension.rb', line 64 def initialize(size) @size = size end |
Instance Attribute Details
#size ⇒ Object (readonly)
63 64 65 |
# File 'lib/puppet/pops/serialization/extension.rb', line 63 def size @size end |
Instance Method Details
#sequence_size ⇒ Object
Sequence size is twice the map size since each entry is written as key and value
69 70 71 |
# File 'lib/puppet/pops/serialization/extension.rb', line 69 def sequence_size @size * 2 end |