Module: Prawn::Table::Interface
- Defined in:
- lib/prawn/table.rb
Experimental API collapse
-
#make_table(data, options = {}, &block) ⇒ Object
Set up, but do not draw, a table.
-
#table(data, options = {}, &block) ⇒ Object
Set up and draw a table on this document.
Instance Method Details
#make_table(data, options = {}, &block) ⇒ Object
Set up, but do not draw, a table. Useful for creating subtables to be inserted into another Table. Call draw
on the resulting Table to ink it.
See the documentation on Prawn::Table for details on the arguments.
121 122 123 |
# File 'lib/prawn/table.rb', line 121 def make_table(data, ={}, &block) Table.new(data, self, , &block) end |
#table(data, options = {}, &block) ⇒ Object
Set up and draw a table on this document. A block can be given, which will be run after cell setup but before layout and drawing.
See the documentation on Prawn::Table for details on the arguments.
110 111 112 113 114 |
# File 'lib/prawn/table.rb', line 110 def table(data, ={}, &block) t = Table.new(data, self, , &block) t.draw t end |