Module: Prawn::Table::Interface

Defined in:
lib/prawn/table.rb

Experimental API collapse

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.



124
125
126
# File 'lib/prawn/table.rb', line 124

def make_table(data, options={}, &block)
  Table.new(data, self, options, &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.



113
114
115
116
117
# File 'lib/prawn/table.rb', line 113

def table(data, options={}, &block)
  t = Table.new(data, self, options, &block)
  t.draw
  t
end