Class: ODF::Table
Instance Method Summary collapse
- #create_row ⇒ Object
-
#initialize(title) ⇒ Table
constructor
A new instance of Table.
- #row ⇒ Object
- #xml ⇒ Object
Methods inherited from Container
Constructor Details
#initialize(title) ⇒ Table
Returns a new instance of Table.
29 30 31 32 |
# File 'lib/odf/table.rb', line 29 def initialize(title) @title = title @last_row = 0 end |
Instance Method Details
#create_row ⇒ Object
34 |
# File 'lib/odf/table.rb', line 34 alias create_row row |
#row ⇒ Object
35 36 37 |
# File 'lib/odf/table.rb', line 35 def row create_row(next_row) {|r| yield r if block_given?} end |
#xml ⇒ Object
39 40 41 42 43 44 |
# File 'lib/odf/table.rb', line 39 def xml Builder::XmlMarkup.new.table:table, 'table:name' => @title do |xml| xml << columns_xml xml << rows_xml end end |