Method: Puppet::Pops::Types::TypeFormatter#string_PTypeSetType
- Defined in:
- lib/puppet/pops/types/type_formatter.rb
#string_PTypeSetType(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.
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 |
# File 'lib/puppet/pops/types/type_formatter.rb', line 472 def string_PTypeSetType(t) append_array('TypeSet') do append_hash(t._pcore_init_hash.each, proc { |k| @bld << symbolic_key(k) }) do |k, v| case k when KEY_TYPES old_ts = @type_set @type_set = t begin append_hash(v, proc { |tk| @bld << symbolic_key(tk) }) do |_tk, tv| if tv.is_a?(Hash) append_object_hash(tv) else append_string(tv) end end rescue @type_set = old_ts end when KEY_REFERENCES append_hash(v, proc { |tk| @bld << symbolic_key(tk) }) else append_string(v) end end end end |