Method: String#value_fold
- Defined in:
- lib/wavefront-cli/stdlib/string.rb
#value_fold(indent = 0, twidth = TW) ⇒ Object
Fold long value lines in two-column output. The returned string is appended to a key, so the first line is not indented.
59 60 61 62 |
# File 'lib/wavefront-cli/stdlib/string.rb', line 59 def value_fold(indent = 0, twidth = TW) max_line_length = twidth - indent - 4 scan_line(max_line_length).join("\n#{' ' * indent}") end |