class OoxmlParser::GroupChar
Class for ‘groupChr` data
Attributes
@return [ValuedChild] position object
@return [ValuedChild] symbol object
@return [ValuedChild] vertical align object
Public Instance Methods
Source
# File lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_formula/group_char.rb, line 17 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_object = ValuedChild.new(:string, parent: self).parse(node_child_child) when 'pos' @position_object = ValuedChild.new(:string, parent: self).parse(node_child_child) when 'vertJc' @vertical_align_object = ValuedChild.new(:string, parent: self).parse(node_child_child) end end end end @element = DocxFormula.new(parent: self).parse(node) self end
Parse GroupChar
object @param node [Nokogiri::XML:Element] node to parse @return [GroupChar] result of parsing
Source
# File lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_formula/group_char.rb, line 43 def position @position_object.value end
@return [String] position value
Source
# File lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_formula/group_char.rb, line 38 def symbol @symbol_object.value end
@return [String] symbol value
Source
# File lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_formula/group_char.rb, line 48 def vertical_align @vertical_align_object.value end
@return [String] vertical align value