Method: Puppet::Pops::Types::PNumericType#initialize
- Defined in:
- lib/puppet/pops/types/types.rb
#initialize(from, to = Float::INFINITY) ⇒ PNumericType
Returns a new instance of PNumericType.
892 893 894 895 896 897 898 |
# File 'lib/puppet/pops/types/types.rb', line 892 def initialize(from, to = Float::INFINITY) from = -Float::INFINITY if from.nil? || from == :default to = Float::INFINITY if to.nil? || to == :default raise ArgumentError, "'from' must be less or equal to 'to'. Got (#{from}, #{to}" if from > to @from = from @to = to end |