Class: Prawn::Table::Cell::Subtable
- Inherits:
-
Prawn::Table::Cell
- Object
- Prawn::Table::Cell
- Prawn::Table::Cell::Subtable
- Defined in:
- lib/prawn/table/cell/subtable.rb
Overview
A Cell that contains another table.
Constant Summary
Constants inherited from Prawn::Table::Cell
Instance Attribute Summary collapse
-
#subtable ⇒ Object
readonly
Returns the value of attribute subtable.
Attributes inherited from Prawn::Table::Cell
#background_color, #border_colors, #border_widths, #borders, #content, #height, #padding
Instance Method Summary collapse
-
#draw_content ⇒ Object
Draws the subtable.
-
#initialize(pdf, point, options = {}) ⇒ Subtable
constructor
A new instance of Subtable.
-
#max_width ⇒ Object
Proxied to subtable.
-
#min_width ⇒ Object
Proxied to subtable.
-
#natural_content_height ⇒ Object
Proxied to subtable.
-
#natural_content_width ⇒ Object
Proxied to subtable.
-
#text_color=(color) ⇒ Object
Sets the text color of the entire subtable.
Methods inherited from Prawn::Table::Cell
#border_bottom_color, #border_bottom_color=, #border_bottom_width, #border_bottom_width=, #border_color=, #border_left_color, #border_left_color=, #border_left_width, #border_left_width=, #border_right_color, #border_right_color=, #border_right_width, #border_right_width=, #border_top_color, #border_top_color=, #border_top_width, #border_top_width=, #border_width=, #content_height, #content_width, #draw, #draw_background, #draw_borders, #draw_bounded_content, draw_cells, make, #padding_bottom, #padding_bottom=, #padding_left, #padding_left=, #padding_right, #padding_right=, #padding_top, #padding_top=, #set_width_constraints, #style, #width, #width=, #x, #x=, #y, #y=
Constructor Details
#initialize(pdf, point, options = {}) ⇒ Subtable
Returns a new instance of Subtable.
18 19 20 21 22 23 24 |
# File 'lib/prawn/table/cell/subtable.rb', line 18 def initialize(pdf, point, ={}) super @subtable = [:content] # Subtable padding defaults to zero @padding = [0, 0, 0, 0] end |
Instance Attribute Details
#subtable ⇒ Object (readonly)
Returns the value of attribute subtable.
16 17 18 |
# File 'lib/prawn/table/cell/subtable.rb', line 16 def subtable @subtable end |
Instance Method Details
#draw_content ⇒ Object
Draws the subtable.
58 59 60 |
# File 'lib/prawn/table/cell/subtable.rb', line 58 def draw_content @subtable.draw end |
#max_width ⇒ Object
Proxied to subtable.
46 47 48 |
# File 'lib/prawn/table/cell/subtable.rb', line 46 def max_width @subtable.cells.max_width end |
#min_width ⇒ Object
Proxied to subtable.
40 41 42 |
# File 'lib/prawn/table/cell/subtable.rb', line 40 def min_width @subtable.cells.min_width end |
#natural_content_height ⇒ Object
Proxied to subtable.
52 53 54 |
# File 'lib/prawn/table/cell/subtable.rb', line 52 def natural_content_height @subtable.cells.height end |
#natural_content_width ⇒ Object
Proxied to subtable.
34 35 36 |
# File 'lib/prawn/table/cell/subtable.rb', line 34 def natural_content_width @subtable.cells.width end |
#text_color=(color) ⇒ Object
Sets the text color of the entire subtable.
28 29 30 |
# File 'lib/prawn/table/cell/subtable.rb', line 28 def text_color=(color) @subtable.cells.text_color = color end |