method
wrap
wrap(string, width)
private
Hide source
# File lib/rexml/formatters/pretty.rb, line 127 def wrap(string, width) # Recursivly wrap string at width. return string if string.length <= width place = string.rindex(' ', width) # Position in string with last ' ' before cutoff return string[0,place] + "\n" + wrap(string[place+1..-1], width) end