Class: SimpleTextExtract::TextExtractor
- Inherits:
-
Object
- Object
- SimpleTextExtract::TextExtractor
- Defined in:
- lib/simple_text_extract/text_extractor.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Instance Method Summary collapse
-
#initialize(filename: nil, raw: nil, filepath: nil, tempfile: nil) ⇒ TextExtractor
constructor
A new instance of TextExtractor.
- #to_s ⇒ Object
Constructor Details
#initialize(filename: nil, raw: nil, filepath: nil, tempfile: nil) ⇒ TextExtractor
Returns a new instance of TextExtractor.
7 8 9 |
# File 'lib/simple_text_extract/text_extractor.rb', line 7 def initialize(filename: nil, raw: nil, filepath: nil, tempfile: nil) @file = get_file(filename: filename, raw: raw, filepath: filepath, tempfile: tempfile) end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
5 6 7 |
# File 'lib/simple_text_extract/text_extractor.rb', line 5 def file @file end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/simple_text_extract/text_extractor.rb', line 11 def to_s @to_s ||= extract.to_s end |