class OoxmlParser::Accent
Class for ‘acc` data
Attributes
element[RW]
symbol_object[R]
@return [ValuedChild] symbol object
Public Instance Methods
parse(node)
click to toggle source
Parse Accent
object @param node [Nokogiri::XML:Element] node to parse @return [Accent] result of parsing
# File lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_formula/accent.rb, line 13 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'accPr' 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) end end end end @element = DocxFormula.new(parent: self).parse(node) self end
symbol()
click to toggle source
@return [String] symbol value
# File lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_formula/accent.rb, line 30 def symbol @symbol_object.value end