class OoxmlParser::TextBody
Class for parsing `txBody` tags
Attributes
paragraphs[RW]
properties[RW]
Public Class Methods
new(parent: nil)
click to toggle source
Calls superclass method
# File lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/text_body.rb, line 8 def initialize(parent: nil) @paragraphs = [] super end
Public Instance Methods
parse(node)
click to toggle source
Parse TextBody
object @param node [Nokogiri::XML:Element] node to parse @return [TextBody] result of parsing
# File lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/text_body.rb, line 16 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'p' @paragraphs << Paragraph.new(parent: self).parse(node_child) when 'bodyPr' @properties = OOXMLShapeBodyProperties.new(parent: self).parse(node_child) end end self end