# File lib/rhc/highline_extensions.rb, line 355 def column_widths @column_widths ||= begin widths = Array.new(columns){ Width.new(0,0,0) } (source_rows + headers).each do |row| row.each_with_index do |col, i| w = widths[i] s = col.strip_ansi word_length = s.scan(/\b\S+/).inject(0){ |l, word| l = word.length if l <= word.length; l } w.min = word_length unless w.min > word_length w.max = s.length unless w.max > s.length end end widths end end