def rows
@rows ||= begin
body = (header_rows + source_rows).inject([]) do |a,row|
row = row.zip(widths).map{ |column,w| w && w > 0 ? column.textwrap_ansi(w, false) : [column] }
(row.map(&:length).max || 0).times do |i|
s = []
row.each_with_index do |lines, j|
cell = lines[i]
l = cell ? cell.strip_ansi.length : 0
s <<
if align[j] == :right
"#{' '*(widths[j]-l) if l < widths[j]}#{cell}"
else
"#{cell}#{' '*(widths[j]-l) if l < widths[j]}"
end
end
a << "#{indent}#{s.join(joiner).rstrip}"
end
a
end
body = heading.to_a.concat(body) if heading
body
end
end