Method: Puppet::Pops::Types::PStringType#initialize

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

#initialize(size_type_or_value, deprecated_multi_args = EMPTY_ARRAY) ⇒ PStringType

Returns a new instance of PStringType.



1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
# File 'lib/puppet/pops/types/types.rb', line 1509

def initialize(size_type_or_value, deprecated_multi_args = EMPTY_ARRAY)
  unless deprecated_multi_args.empty?
    if Puppet[:strict] != :off
      #TRANSLATORS 'PStringType#initialize' is a class and method name and should not be translated
      Puppet.warn_once('deprecations', "PStringType#initialize_multi_args",
                       _("Passing more than one argument to PStringType#initialize is deprecated"))
    end
    size_type_or_value = deprecated_multi_args[0]
  end
  @size_type_or_value = size_type_or_value.is_a?(PIntegerType) ? size_type_or_value.to_size : size_type_or_value
end