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


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

def initialize(attribute_count)
  @attribute_count = attribute_count
end

Instance Attribute Details

#attribute_countObject (readonly)


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

def attribute_count
  @attribute_count
end

Instance Method Details

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


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

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

#hashObject


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

def hash
  attribute_count.hash
end

#sequence_sizeObject


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

def sequence_size
  @attribute_count
end