Sha256: cf1c3a3e09862d0d5fe1402cd6c3e6bbab875b5a0939e07cbd53fb287b749917
Contents?: true
Size: 688 Bytes
Versions: 48
Compression:
Stored size: 688 Bytes
Contents
# frozen_string_literal: true module OoxmlParser # Class for 'sSubSup', 'sSup', 'sSub' data class Index < OOXMLDocumentObject attr_accessor :value, :top_index, :bottom_index # Parse Index object # @param node [Nokogiri::XML:Element] node to parse # @return [Index] result of parsing def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'sup' @top_index = DocxFormula.new(parent: self).parse(node_child) when 'sub' @bottom_index = DocxFormula.new(parent: self).parse(node_child) end end @value = DocxFormula.new(parent: self).parse(node) self end end end
Version data entries
48 entries across 48 versions & 1 rubygems