Class: Plaintext::ZippedXmlHandler
- Inherits:
-
FileHandler
- Object
- FileHandler
- Plaintext::ZippedXmlHandler
- Defined in:
- lib/plaintext/file_handler/zipped_xml_handler.rb
Overview
Handler base class for XML based (MS / Open / Libre) office documents.
Direct Known Subclasses
Defined Under Namespace
Classes: SaxDocument
Instance Method Summary collapse
Methods inherited from FileHandler
Instance Method Details
#text(file) ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'lib/plaintext/file_handler/zipped_xml_handler.rb', line 40 def text(file) Zip::File.open(file) do |zip_file| zip_file.each do |entry| if entry.name == @file_name return xml_to_text entry.get_input_stream end end end end |