Class: Wizport::Document::PdfTable

Inherits:
Object
  • Object
show all
Defined in:
lib/wizport/document/pdf_table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#rowsObject

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