Class: Mindee::Input::Source::FileInputSource

Inherits:
LocalInputSource show all
Defined in:
lib/mindee/input/sources/file_input_source.rb

Overview

Load a document from a file handle.

Instance Attribute Summary

Attributes inherited from LocalInputSource

#file_mimetype, #filename, #io_stream

Instance Method Summary collapse

Methods inherited from LocalInputSource

#compress!, #count_pages, #pdf?, #process_pdf, #read_contents, #rescue_broken_pdf, #source_text?, #write_to_file

Constructor Details

#initialize(input_file, filename, repair_pdf: false) ⇒ FileInputSource

Returns a new instance of FileInputSource.

Parameters:

  • input_file (File)
  • filename (String)
  • repair_pdf (bool) (defaults to: false)


13
14
15
16
# File 'lib/mindee/input/sources/file_input_source.rb', line 13

def initialize(input_file, filename, repair_pdf: false)
  io_stream = input_file
  super(io_stream, filename, repair_pdf: repair_pdf)
end