class Docxi::Word::Contents::TableOfContent
Attributes
options[RW]
rows[RW]
Public Class Methods
new(options={}) { |self| ... }
click to toggle source
# File lib/docxi/word/contents/table_of_content.rb, line 8 def initialize(options={}) @options = options @rows = [] if block_given? yield self else end end
Public Instance Methods
add_row(text, page=nil, options={})
click to toggle source
# File lib/docxi/word/contents/table_of_content.rb, line 19 def add_row(text, page=nil, options={}) row = Row.new(text, page, options) @rows << row row end
render(xml)
click to toggle source
# File lib/docxi/word/contents/table_of_content.rb, line 25 def render(xml) @rows.each do |row| row.render(xml) end end