# File lib/mole/moler.rb, line 58 def truncate(text, length = 200, truncate_string = "...") return "" if text.nil? l = length - truncate_string.chars.length text.chars.length > length ? (text.chars[0...l] + truncate_string).to_s : text end