class Prawn::Document
Public Instance Methods
cell(options={})
click to toggle source
Instantiates and draws a cell on the document.
cell(:content => "Hello world!", :at => [12, 34])
See Prawn::Table::Cell.make
for full options.
# File lib/prawn/table/cell.rb, line 21 def cell(options={}) cell = Table::Cell.make(self, options.delete(:content), options) cell.draw cell end
make_cell(content, options={})
click to toggle source
Set up, but do not draw, a cell. Useful for creating cells with formatting options to be inserted into a Table
. Call draw
on the resulting Cell to ink it.
See the documentation on Prawn::Cell for details on the arguments.
# File lib/prawn/table/cell.rb, line 33 def make_cell(content, options={}) Prawn::Table::Cell.make(self, content, options) end