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.



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

def initialize(attribute_count)
  @attribute_count = attribute_count
end

Instance Attribute Details

#attribute_countObject (readonly)



127
128
129
# File 'lib/puppet/pops/serialization/extension.rb', line 127

def attribute_count
  @attribute_count
end

Instance Method Details

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

Returns:

  • (Boolean)


137
138
139
# File 'lib/puppet/pops/serialization/extension.rb', line 137

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

#hashObject



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

def hash
  attribute_count.hash
end

#sequence_sizeObject



142
143
144
# File 'lib/puppet/pops/serialization/extension.rb', line 142

def sequence_size
  @attribute_count
end