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, options = {}) ⇒ Object
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/plaintext/file_handler/zipped_xml_handler.rb', line 53 def text(file, = {}) max_size = [:max_size] 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, max_size end end end end |