Sha256: 94b06e9e00341d767aa785b26ae44a517ab428299845f8e0d1830884d5271b66
Contents?: true
Size: 891 Bytes
Versions: 9
Compression:
Stored size: 891 Bytes
Contents
# frozen_string_literal: true module OoxmlParser # Class for `acc` data class Accent < OOXMLDocumentObject # @return [ValuedChild] symbol object attr_reader :symbol_object attr_accessor :element # Parse Accent object # @param node [Nokogiri::XML:Element] node to parse # @return [Accent] result of parsing 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 # @return [String] symbol value def symbol @symbol_object.value end end end
Version data entries
9 entries across 9 versions & 1 rubygems