Method: Puppet::Pops::Types::TypeFormatter#append_indented_string
- Defined in:
- lib/puppet/pops/types/type_formatter.rb
#append_indented_string(t, indent = 0, indent_width = 2, skip_initial_indent = false) ⇒ 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.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/puppet/pops/types/type_formatter.rb', line 74 def append_indented_string(t, indent = 0, indent_width = 2, skip_initial_indent = false) save_indent = @indent save_indent_width = @indent_width @indent = indent @indent_width = indent_width begin (@indent * @indent_width).times { @bld << ' ' } unless skip_initial_indent append_string(t) @bld << "\n" ensure @indent = save_indent @indent_width = save_indent_width end end |