Sha256: f351fc1deafdd8cf9a8e5dab400936f93f0a7e1750e6895c46007e2b8f387b89
Contents?: true
Size: 577 Bytes
Versions: 4
Compression:
Stored size: 577 Bytes
Contents
module OoxmlParser # Class for 'f' data class Fraction < OOXMLDocumentObject attr_accessor :numerator, :denominator # Parse Fraction object # @param node [Nokogiri::XML:Element] node to parse # @return [Fraction] result of parsing def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'num' @numerator = DocxFormula.new(parent: self).parse(node_child) when 'den' @denominator = DocxFormula.new(parent: self).parse(node_child) end end self end end end
Version data entries
4 entries across 4 versions & 1 rubygems