Class: Prawn::Document
- Inherits:
-
Object
- Object
- Prawn::Document
- Defined in:
- lib/prawn/table/cell.rb
Experimental API collapse
-
#cell(options = {}) ⇒ Object
Instantiates and draws a cell on the document.
-
#make_cell(content, options = {}) ⇒ Object
Set up, but do not draw, a cell.
Instance Method Details
#cell(options = {}) ⇒ Object
Instantiates and draws a cell on the document.
cell(:content => "Hello world!", :at => [12, 34])
See Prawn::Table::Cell.make for full options.
21 22 23 24 25 |
# File 'lib/prawn/table/cell.rb', line 21 def cell(={}) cell = Table::Cell.make(self, .delete(:content), ) cell.draw cell end |
#make_cell(content, options = {}) ⇒ Object
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.
33 34 35 |
# File 'lib/prawn/table/cell.rb', line 33 def make_cell(content, ={}) Prawn::Table::Cell.make(self, content, ) end |