Class: Doc2Text::Odt::XmlNodes::Table::TableRow
- Inherits:
-
Object
- Object
- Doc2Text::Odt::XmlNodes::Table::TableRow
- Includes:
- Node
- Defined in:
- lib/doc2text/odt_xml_namespaces.rb
Instance Attribute Summary
Attributes included from Node
#attrs, #children, #name, #parent, #prefix, #text
Instance Method Summary collapse
Methods included from Node
#close, create_node, #delete, #delete_on_close?, #eql?, #generic?, #has_text?, included, #initialize, #not_deleted?, #not_enclosing?, #open, #root?, titleize, #to_s, #un_delete, #xml_name
Instance Method Details
#expand ⇒ Object
70 71 72 73 74 75 |
# File 'lib/doc2text/odt_xml_namespaces.rb', line 70 def header_delimiter = parent.children.count >= 2 && parent.children[1] == self ? "\n|---|---|" : '' result = "\n#{@children.select(&:not_deleted?).map(&:expand).join.strip.gsub "\n", ''} |#{header_delimiter}" delete result end |