class OoxmlParser::Delimiter
Class for ‘d` data
Attributes
Public Class Methods
Source
# File lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_formula/delimeter.rb, line 8 def initialize(parent: nil) @begin_character = '(' @end_character = ')' super end
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
Public Instance Methods
Source
# File lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_formula/delimeter.rb, line 17 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'dPr' node_child.xpath('*').each do |node_child_child| case node_child_child.name when 'begChr' @begin_character = ValuedChild.new(:string, parent: self).parse(node_child_child) when 'endChr' @end_character = ValuedChild.new(:string, parent: self).parse(node_child_child) end end end end @value = DocxFormula.new(parent: self).parse(node) self end
Parse Delimiter
object @param node [Nokogiri::XML:Element] node to parse @return [Delimiter] result of parsing