diff --git a/lib/prawn/table/cell.rb b/lib/prawn/table/cell.rb index 83b940f..8025b2d 100644 --- a/lib/prawn/table/cell.rb +++ b/lib/prawn/table/cell.rb @@ -112,6 +112,14 @@ def max_width # attr_writer :height + # Manually specify the cell's min_width + # + attr_writer :min_width + + # Manually specify the cell's max_width + # + attr_writer :max_width + # Specifies which borders to enable. Must be an array of zero or more of: # [:left, :right, :top, :bottom]. # diff --git a/lib/prawn/table/cell/text.rb b/lib/prawn/table/cell/text.rb index ff28789..48ebbf7 100644 --- a/lib/prawn/table/cell/text.rb +++ b/lib/prawn/table/cell/text.rb @@ -82,8 +82,9 @@ def set_width_constraints unless defined?(@min_width) && @min_width min_content_width = [natural_content_width, styled_width_of_single_character].min @min_width = padding_left + padding_right + min_content_width - super end + + super end protected