Class: Puppet::Pops::Serialization::Extension::ObjectStart

Inherits:
Object
  • Object
show all
Includes:
SequenceStart
Defined in:
lib/puppet/pops/serialization/extension.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute_count) ⇒ ObjectStart

Returns a new instance of ObjectStart.



121
122
123
# File 'lib/puppet/pops/serialization/extension.rb', line 121

def initialize(attribute_count)
  @attribute_count = attribute_count
end

Instance Attribute Details

#attribute_countObject (readonly)



120
121
122
# File 'lib/puppet/pops/serialization/extension.rb', line 120

def attribute_count
  @attribute_count
end

Instance Method Details

#eql?(o) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


129
130
131
# File 'lib/puppet/pops/serialization/extension.rb', line 129

def eql?(o)
  o.is_a?(ObjectStart) && o.attribute_count == @attribute_count
end

#hashObject



125
126
127
# File 'lib/puppet/pops/serialization/extension.rb', line 125

def hash
  attribute_count.hash
end

#sequence_sizeObject



134
135
136
# File 'lib/puppet/pops/serialization/extension.rb', line 134

def sequence_size
  @attribute_count
end