Class: OoxmlParser::DocxParser

Inherits:
Object
  • Object
show all
Defined in:
lib/ooxml_parser/docx_parser.rb

Overview

Basic class for DocxParser

Class Method Summary collapse

Class Method Details

.parse_docx(path_to_file) ⇒ DocumentStructure

Parse docx file

Parameters:

  • path_to_file (String)

    file path

Returns:



12
13
14
15
16
17
# File 'lib/ooxml_parser/docx_parser.rb', line 12

def self.parse_docx(path_to_file)
  file = OoxmlFile.new(path_to_file)
  Parser.parse_format(file) do |yielded_file|
    DocumentStructure.new(unpacked_folder: yielded_file.path_to_folder).parse
  end
end