Class: Doc2Text::Odt::XmlNodes::Table::TableRow

Inherits:
Object
  • Object
show all
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, #eql?, #generic?, #has_text?, included, #initialize, #not_enclosing?, #office_text?, #open, #root?, titleize, #to_s, #xml_name

Instance Method Details

#expandObject



58
59
60
61
62
63
# File 'lib/doc2text/odt_xml_namespaces.rb', line 58

def expand
  header_delimiter = parent.children.count >= 2 && parent.children[1] == self ? "\n|---|---|" : ''
  result = "\n#{@children.map(&:expand).join.strip.gsub "\n", ''} |#{header_delimiter}"
  delete
  result
end