Method: Puppet::Pops::Types::TypeFormatter#string_POptionalType

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

#string_POptionalType(t) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



525
526
527
528
529
530
531
532
533
534
# File 'lib/puppet/pops/types/type_formatter.rb', line 525

def string_POptionalType(t)
  optional_type = t.optional_type
  append_array('Optional', optional_type.nil?) do
    if optional_type.is_a?(PStringType) && !optional_type.value.nil?
      append_string(optional_type.value)
    else
      append_string(optional_type)
    end
  end
end