Method: Puppet::Pops::Types::TypeCalculator#size_range
- Defined in:
- lib/puppet/pops/types/type_calculator.rb
#size_range(range) ⇒ Object
Transform int range to a size constraint if range == nil the constraint is 1,1 if range.from == nil min size = 1 if range.to == nil max size == Infinity
757 758 759 760 761 762 763 764 765 |
# File 'lib/puppet/pops/types/type_calculator.rb', line 757 def size_range(range) return [1, 1] if range.nil? from = range.from to = range.to x = from.nil? ? 1 : from y = to.nil? ? TheInfinity : to [x, y] end |