Class: SimpleTextExtract::FormatExtractor::Base
- Inherits:
-
Object
- Object
- SimpleTextExtract::FormatExtractor::Base
- Defined in:
- lib/simple_text_extract/format_extractor/base.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Instance Method Summary collapse
- #extract ⇒ Object
-
#initialize(file) ⇒ Base
constructor
A new instance of Base.
- #missing_dependency?(command) ⇒ Boolean
Constructor Details
#initialize(file) ⇒ Base
Returns a new instance of Base.
10 11 12 |
# File 'lib/simple_text_extract/format_extractor/base.rb', line 10 def initialize(file) @file = file end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
8 9 10 |
# File 'lib/simple_text_extract/format_extractor/base.rb', line 8 def file @file end |
Instance Method Details
#extract ⇒ Object
14 15 |
# File 'lib/simple_text_extract/format_extractor/base.rb', line 14 def extract end |
#missing_dependency?(command) ⇒ Boolean
17 18 19 20 |
# File 'lib/simple_text_extract/format_extractor/base.rb', line 17 def missing_dependency?(command) dependency = `bash -c 'command -v #{command}'` dependency.nil? || dependency.empty? end |