Method: Puppet::Pops::Types::TypeFormatter#indented_string

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

#indented_string(t, indent = 0, indent_width = 2) ⇒ Object

Produces an string containing newline characters and indentation that represents the given type or literal t.

Parameters:

  • t (Object)

    the type or literal to produce a string for

  • indent (Integer) (defaults to: 0)

    the current indentation level

  • indent_width (Integer) (defaults to: 2)

    the number of spaces to use for one indentation



67
68
69
70
71
# File 'lib/puppet/pops/types/type_formatter.rb', line 67

def indented_string(t, indent = 0, indent_width = 2)
  @bld = ''.dup
  append_indented_string(t, indent, indent_width)
  @bld
end