class ODFWriter::TableReader
TableReader: find all tables and set name
Attributes
name[RW]
Public Class Methods
new(opts)
click to toggle source
initialize
# File lib/odf_writer/table_reader.rb, line 38 def initialize(opts) @name = opts[:name] end
Public Instance Methods
nodes( doc )
click to toggle source
nodes
# File lib/odf_writer/table_reader.rb, line 56 def nodes( doc ) doc.xpath(".//table:table").map{|node| [node.attr("table:name"), node] }.to_h end
tables( doc )
click to toggle source
tables
# File lib/odf_writer/table_reader.rb, line 47 def tables( doc ) nodes( doc ).keys end