class OoxmlParser::GroupChar
Class for `groupChr` data
Attributes
element[RW]
position[RW]
symbol[RW]
vertical_align[RW]
Public Instance Methods
parse(node)
click to toggle source
Parse GroupChar
object @param node [Nokogiri::XML:Element] node to parse @return [GroupChar] result of parsing
# File lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/group_char.rb, line 11 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'groupChrPr' node_child.xpath('*').each do |node_child_child| case node_child_child.name when 'chr' @symbol = node_child_child.attribute('val').value when 'pos' @position = node_child_child.attribute('val').value when 'vertJc' @vertical_align = node_child_child.attribute('val').value end end end end @element = DocxFormula.new(parent: self).parse(node) self end