Module: Puppet::Pops::Types::PCollectionType::ClassModule

Defined in:
lib/puppet/pops/types/types.rb

Instance Method Summary collapse

Instance Method Details

#==(o) ⇒ Object



278
279
280
# File 'lib/puppet/pops/types/types.rb', line 278

def ==(o)
  self.class == o.class && element_type == o.element_type && size_type == o.size_type
end

#hashObject



274
275
276
# File 'lib/puppet/pops/types/types.rb', line 274

def hash
  [self.class, element_type, size_type].hash
end

#size_rangeObject

Returns an array with from (min) size to (max) size A negative range value in from is



263
264
265
266
267
268
269
270
271
272
# File 'lib/puppet/pops/types/types.rb', line 263

def size_range
  return [0, INFINITY] if size_type.nil?
  f = size_type.from || 0
  t = size_type.to || INFINITY
  if f < t
    [f, t]
  else
    [t,f]
  end
end