Method: Puppet::Pops::Types::PInitType#initialize

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

#initialize(type, init_args) ⇒ PInitType

Returns a new instance of PInitType.



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/puppet/pops/types/p_init_type.rb', line 21

def initialize(type, init_args)
  super(type)
  @init_args = init_args.nil? ? EMPTY_ARRAY : init_args

  if type.nil?
    raise ArgumentError, _('Init cannot be parameterized with an undefined type and additional arguments') unless @init_args.empty?
    @initialized = true
  else
    @initialized = false
  end
end