class Prawn::Table::Cell

def max_width


Maximum width of the entire span group this cell controls.
def max_width
  return max_width_ignoring_span if @colspan == 1
  # Sum the smallest max-width from each column in the group, including
  # myself.
  max_widths = Hash.new(0)
  dummy_cells.each do |cell|
    max_widths[cell.column] =
      [max_widths[cell.column], cell.max_width].min
  end
  max_widths[column] = [max_widths[column], max_width_ignoring_span].min
  max_widths.values.inject(0, &:+)
end