Class: DocRipper::Ripper::Base
- Inherits:
-
Object
- Object
- DocRipper::Ripper::Base
- Defined in:
- lib/doc_ripper/base.rb
Direct Known Subclasses
Formats::DocxRipper, Formats::MsDocRipper, Formats::PdfRipper, Formats::SketchRipper, Formats::TextRipper
Instance Attribute Summary collapse
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
Instance Method Summary collapse
-
#initialize(file_path) ⇒ Base
constructor
A new instance of Base.
- #text ⇒ Object
Constructor Details
#initialize(file_path) ⇒ Base
Returns a new instance of Base.
7 8 9 10 11 |
# File 'lib/doc_ripper/base.rb', line 7 def initialize(file_path) file_parts = file_path.split('.') @file_path = file_path @extension = file_parts.last end |
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
5 6 7 |
# File 'lib/doc_ripper/base.rb', line 5 def file_path @file_path end |
Instance Method Details
#text ⇒ Object
13 14 15 |
# File 'lib/doc_ripper/base.rb', line 13 def text @text ||= rip end |