module Chamomile::Wrap
Public Class Methods
Source
# File lib/chamomile/styling/wrap.rb, line 6 def word_wrap(str, width) return str if width <= 0 lines = str.split("\n", -1) result = [] lines.each do |line| result.concat(wrap_line(line, width)) end result.join("\n") end