Method: Puppet::Pops::Types::PHashType#initialize

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

#initialize(key_type, value_type, size_type = nil) ⇒ PHashType

Returns a new instance of PHashType.



2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
# File 'lib/puppet/pops/types/types.rb', line 2688

def initialize(key_type, value_type, size_type = nil)
  super(size_type)
  if !size_type.nil? && size_type.from == 0 && size_type.to == 0
    @key_type = PUnitType::DEFAULT
    @value_type = PUnitType::DEFAULT
  else
    @key_type = key_type.nil? ? PAnyType::DEFAULT : key_type
    @value_type = value_type.nil? ? PAnyType::DEFAULT : value_type
  end
end