Sha256: 0541cf5756fcd7245c085bc07fb6b21264231f7c19d54a2f134ffd3ce5671435

Contents?: true

Size: 537 Bytes

Versions: 4

Compression:

Stored size: 537 Bytes

Contents

module OoxmlParser
  # Class for `func` data
  class Function < OOXMLDocumentObject
    attr_accessor :name, :argument

    # Parse Function object
    # @param node [Nokogiri::XML:Element] node to parse
    # @return [Function] result of parsing
    def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'fName'
          @name = DocxFormula.new(parent: self).parse(node_child)
        end
      end
      @argument = DocxFormula.new(parent: self).parse(node)
      self
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ooxml_parser-0.4.1 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/function.rb
ooxml_parser-0.4.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/function.rb
ooxml_parser-0.3.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/function.rb
ooxml_parser-0.2.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/docx_formula/function.rb