Sha256: 131d7880ef4836bc9913b17ef89de69386562a88f68ba1df4c1b65a542c6f4ab
Contents?: true
Size: 528 Bytes
Versions: 7
Compression:
Stored size: 528 Bytes
Contents
# frozen_string_literal: true module SimpleTextExtract class TextExtractor def self.call(filename: nil, raw: nil, filepath: nil) if !filename.nil? && !raw.nil? TempfileExtractor.new(filename: filename.to_s, raw: raw).extract elsif !filepath.nil? && File.exist?(filepath) FileExtractor.new(filepath: filepath).extract end end def extract text = FormatExtractorFactory.call(file).extract cleanup text end private def cleanup end end end
Version data entries
7 entries across 7 versions & 1 rubygems