Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
Report abuse
1 2 3 4 5
def should_wrap? line_lengths=body.split("\n").map { |s| s.length } long_lines=line_lengths.select { |l| l>80 }.size return true if long_lines.to_f/line_lengths.size > 0.20 end
Pasted August 15, 2006 8:03PM EDT
by Josh Goebel (jgoebel)
Embed
paste again
Ads from Ruby Row