Module: OoxmlParser::DocumentStructureHelpers

Included in:
DocumentStructure
Defined in:
lib/ooxml_parser/docx_parser/document_structure/document_structure_helpers.rb

Overview

method to help to work with DocumentStructure

Instance Method Summary collapse

Instance Method Details

#with_data?True, false

Returns if structure contain any user data.

Returns:

  • (True, false)

    if structure contain any user data



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ooxml_parser/docx_parser/document_structure/document_structure_helpers.rb', line 7

def with_data?
  @elements.each do |current_element|
    return true if current_element.with_data?
  end
  @notes.each do |current_note|
    current_note.elements.each do |note_element|
      return true if note_element.with_data?
    end
  end
  false
end