Sha256: 2a1488344ba9c4bf008c517c1364444614e55aad93390876b3a7702d4fc76b32
Contents?: true
Size: 209 Bytes
Versions: 12
Compression:
Stored size: 209 Bytes
Contents
class String def wrap(width) split("\n").collect { |line| if line.length > width line.gsub(/(.{1,#{width}})(\s+|$)/, "\\1\n").strip else line end } * "\n" end end
Version data entries
12 entries across 12 versions & 1 rubygems