| Module | RDig::ContentExtractors::ExternalAppHelper |
| In: |
lib/rdig/content_extractors.rb
|
to be used by concrete implementations having a get_content class method that takes a path to a file and return the textual content extracted from that file.
# File lib/rdig/content_extractors.rb, line 59
59: def as_file(content)
60: file = Tempfile.new('rdig')
61: file << content
62: file.close
63: yield file
64: file.delete
65: end
setting @available according to presence of external executables in initializer of ContentExtractor is needed to make this work
# File lib/rdig/content_extractors.rb, line 69
69: def can_do(content_type)
70: @available and super(content_type)
71: end