Method: Puppet::Pops::Types::PAbstractTimeDataType#initialize
- Defined in:
- lib/puppet/pops/types/p_timespan_type.rb
#initialize(from, to = nil) ⇒ PAbstractTimeDataType
Returns a new instance of PAbstractTimeDataType.
8 9 10 11 12 |
# File 'lib/puppet/pops/types/p_timespan_type.rb', line 8 def initialize(from, to = nil) @from = convert_arg(from, true) @to = convert_arg(to, false) raise ArgumentError, "'from' must be less or equal to 'to'. Got (#{@from}, #{@to}" unless @from <= @to end |