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.
69 70 71 |
# File 'lib/puppet/pops/serialization/extension.rb', line 69 def initialize(size) @size = size end |
Instance Attribute Details
#size ⇒ Object (readonly)
67 68 69 |
# File 'lib/puppet/pops/serialization/extension.rb', line 67 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
74 75 76 |
# File 'lib/puppet/pops/serialization/extension.rb', line 74 def sequence_size @size * 2 end |