Sha256: e9d2b5a6396a639790ab65b514679a5f680b41133aff9035443c593552118c90
Contents?: true
Size: 642 Bytes
Versions: 8
Compression:
Stored size: 642 Bytes
Contents
# frozen_string_literal: true module OoxmlParser # Class for `rad` data class Radical < OOXMLDocumentObject attr_accessor :degree, :value def initialize(parent: nil) @degree = 2 @parent = parent end # Parse Radical object # @param node [Nokogiri::XML:Element] node to parse # @return [Radical] result of parsing def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'deg' @degree = DocxFormula.new(parent: self).parse(node_child) end end @value = DocxFormula.new(parent: self).parse(node) self end end end
Version data entries
8 entries across 8 versions & 1 rubygems