Sha256: f94280e3e4ca9079de6ddc43ac87e5064d1f75f45b98df5119b5335138280ddf

Contents?: true

Size: 1.19 KB

Versions: 48

Compression:

Stored size: 1.19 KB

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for parsing `footnotePr` tags
  class FootnoteProperties < OOXMLDocumentObject
    # @return [NumberingFormat] format of numbering
    attr_accessor :numbering_format
    # @return [ValuedChild] type of numbering restart
    attr_accessor :numbering_restart
    # @return [ValuedChild] value of numbering start
    attr_accessor :numbering_start
    # @return [ValuedChild] position of footnote
    attr_accessor :position

    # Parse FootnoteProperties
    # @param [Nokogiri::XML:Element] node with FootnoteProperties
    # @return [FootnoteProperties] value of FootnoteProperties
    def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'numFmt'
          @numbering_format = ValuedChild.new(:symbol, parent: self).parse(node_child)
        when 'numRestart'
          @numbering_restart = ValuedChild.new(:symbol, parent: self).parse(node_child)
        when 'numStart'
          @numbering_start = ValuedChild.new(:integer, parent: self).parse(node_child)
        when 'pos'
          @position = ValuedChild.new(:symbol, parent: self).parse(node_child)
        end
      end
      self
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
ooxml_parser-0.8.1 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.8.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.7.2 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.7.1 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.7.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.6.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.5.1 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.5.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb