def abbreviate(text, suffix: ' ...', length: 200)
      content_length = length - suffix.length
      short = text.to_s.lines.first.to_s.strip[0...content_length].strip
      yield text if block_given?
      short << suffix unless short.eql? text.to_s.strip
      short
    end
def abbreviate(text, suffix: ' ...', length: 200)
      content_length = length - suffix.length
      short = text.to_s.lines.first.to_s.strip[0...content_length].strip
      yield text if block_given?
      short << suffix unless short.eql? text.to_s.strip
      short
    end
Truncates the given text, appending a suffix if it was above the allowed
 length.

 @param text [String] the text to truncate
 @param suffix [String] the suffix to append if the text is truncated
 @param length [Integer] the maximum length including the suffix
 @yield [String] the truncated string before the ellipsis is appended
 @return short [String] the abbreviated text