lib/column.rb in table_pal-0.3.1 vs lib/column.rb in table_pal-0.3.2
- old
+ new
@@ -13,10 +13,10 @@
@justification = justification
@colour = colour
end
def width
- table.select_cells(column: self).max_by(&:width).width
+ @width ||= table.select_cells(column: self).max_by(&:width).width
end
def left_padding_char(char)
char * left_padding.length
end