Class: Wizport::Document::PdfTable
- Inherits:
-
Object
- Object
- Wizport::Document::PdfTable
- Defined in:
- lib/wizport/document/pdf_table.rb
Instance Attribute Summary collapse
-
#rows ⇒ Object
Returns the value of attribute rows.
Instance Method Summary collapse
-
#initialize(rows = nil, &block) ⇒ PdfTable
constructor
A new instance of PdfTable.
- #row(cells) ⇒ Object
Constructor Details
#initialize(rows = nil, &block) ⇒ PdfTable
Returns a new instance of PdfTable.
10 11 12 13 |
# File 'lib/wizport/document/pdf_table.rb', line 10 def initialize(rows = nil,&block) @rows = rows || [] block.arity<1 ? self.instance_eval(&block) : block.call(self) if block_given? end |
Instance Attribute Details
#rows ⇒ Object
Returns the value of attribute rows.
9 10 11 |
# File 'lib/wizport/document/pdf_table.rb', line 9 def rows @rows end |
Instance Method Details
#row(cells) ⇒ Object
15 16 17 |
# File 'lib/wizport/document/pdf_table.rb', line 15 def row(cells) @rows << cells end |