# File lib/puppet/pops/types/types.rb, line 287 def ==(o) self.class == o.class && types == o.types && size_type == o.size_type end
# File lib/puppet/pops/types/types.rb, line 283 def hash [self.class, size_type, Set.new(types)].hash end
Returns the number of accepted occurrences [min, max] of the last type in the tuple The defaults is [1,1]
# File lib/puppet/pops/types/types.rb, line 271 def repeat_last_range types_size = types.size if size_type.nil? return [1, 1] end from, to = size_type.range() min = from - (types_size-1) min = min <= 0 ? 0 : min max = to - (types_size-1) [min, max] end
Returns the number of elements accepted [min, max] in the tuple
# File lib/puppet/pops/types/types.rb, line 263 def size_range types_size = types.size size_type.nil? ? [types_size, types_size] : size_type.range end