Class: OoxmlParser::FootnoteProperties

Inherits:
OOXMLDocumentObject show all
Defined in:
lib/ooxml_parser/docx_parser/document_structure/page_properties/footnote_properties.rb

Overview

Class for parsing ‘footnotePr` tags

Instance Attribute Summary collapse

Attributes inherited from OOXMLDocumentObject

#parent

Instance Method Summary collapse

Methods inherited from OOXMLDocumentObject

#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?

Methods included from OoxmlObjectAttributeHelper

#attribute_enabled?, #option_enabled?

Methods included from OoxmlDocumentObjectHelper

#to_hash

Constructor Details

This class inherits a constructor from OoxmlParser::OOXMLDocumentObject

Instance Attribute Details

#numbering_formatNumberingFormat

Returns format of numbering.

Returns:



7
8
9
# File 'lib/ooxml_parser/docx_parser/document_structure/page_properties/footnote_properties.rb', line 7

def numbering_format
  @numbering_format
end

#numbering_restartValuedChild

Returns type of numbering restart.

Returns:



9
10
11
# File 'lib/ooxml_parser/docx_parser/document_structure/page_properties/footnote_properties.rb', line 9

def numbering_restart
  @numbering_restart
end

#numbering_startValuedChild

Returns value of numbering start.

Returns:



11
12
13
# File 'lib/ooxml_parser/docx_parser/document_structure/page_properties/footnote_properties.rb', line 11

def numbering_start
  @numbering_start
end

#positionValuedChild

Returns position of footnote.

Returns:



13
14
15
# File 'lib/ooxml_parser/docx_parser/document_structure/page_properties/footnote_properties.rb', line 13

def position
  @position
end

Instance Method Details

#parse(node) ⇒ FootnoteProperties

Parse FootnoteProperties

Parameters:

  • node (Nokogiri::XML:Element)

    with FootnoteProperties

Returns:



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/ooxml_parser/docx_parser/document_structure/page_properties/footnote_properties.rb', line 18

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