Class: SimpleTextExtract::TextExtractor
- Inherits:
-
Object
- Object
- SimpleTextExtract::TextExtractor
show all
- Defined in:
- lib/simple_text_extract/text_extractor.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.call(filename: nil, raw: nil, filepath: nil) ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/simple_text_extract/text_extractor.rb', line 5
def self.call(filename: nil, raw: nil, filepath: nil)
if !filename.nil? && !raw.nil?
.new(filename: filename.to_s, raw: raw).
elsif !filepath.nil? && File.exist?(filepath)
.new(filepath: filepath).
end
end
|
Instance Method Details
13
14
15
16
17
18
|
# File 'lib/simple_text_extract/text_extractor.rb', line 13
def
text = .call(file).
cleanup
text
end
|