def word_wrap(text, col: 24)
      text.strip.gsub(/\n\r/, '\s')
      text = WordWrapper::MinimumRaggedness.new(col, text).wrap
      text = text.split("\n").map do |line|
        line.length > col ? line.gsub(/(.{1,#{col}})( +|$\n?)|(.{1,#{col}})/, "\\1\\3\n").strip : line
      end * "\n"
      text.strip
    end
def word_wrap(text, col: 24)
      text.strip.gsub(/\n\r/, '\s')
      text = WordWrapper::MinimumRaggedness.new(col, text).wrap
      text = text.split("\n").map do |line|
        line.length > col ? line.gsub(/(.{1,#{col}})( +|$\n?)|(.{1,#{col}})/, "\\1\\3\n").strip : line
      end * "\n"
      text.strip
    end
rubocop:enable Metrics/AbcSize