Method: String#opt_fold

Defined in:
lib/wavefront-cli/stdlib/string.rb

#opt_fold(twidth = TW, indent = 10) ⇒ String

Wrapper around #fold()

Parameters:

  • twidth (Integer) (defaults to: TW)

    width of terminal, in chars

  • indent (Integer) (defaults to: 10)

    hanging indent of following lines

Returns:

  • (String)

    folded and indented string



23
24
25
# File 'lib/wavefront-cli/stdlib/string.rb', line 23

def opt_fold(twidth = TW, indent = 10)
  fold(twidth, indent, '  ')
end