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.21.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.20.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.19.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.18.1 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.18.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.17.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.16.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.15.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.14.2 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.14.1-mingw32 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.14.1 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.14.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.13.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.12.2 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.12.1 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.12.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.11.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.10.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.9.1 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb
ooxml_parser-0.9.0 lib/ooxml_parser/docx_parser/docx_data/document_structure/page_properties/footnote_properties.rb