Class: Plaintext::DocHandler
- Inherits:
-
ExternalCommandHandler
- Object
- FileHandler
- ExternalCommandHandler
- Plaintext::DocHandler
- Defined in:
- lib/plaintext/file_handler/external_command_handler/doc_handler.rb
Constant Summary collapse
- CONTENT_TYPES =
[ 'application/vnd.ms-word', 'application/msword' ]
- DEFAULT =
[ '/usr/bin/catdoc', '-dutf-8', '__FILE__' ]
Constants inherited from ExternalCommandHandler
ExternalCommandHandler::DEFAULT_STREAM_ENCODING, ExternalCommandHandler::FILE_PLACEHOLDER
Instance Method Summary collapse
-
#initialize ⇒ DocHandler
constructor
A new instance of DocHandler.
Methods inherited from ExternalCommandHandler
#accept?, available?, #available?, #shellout, #text
Methods inherited from FileHandler
Constructor Details
#initialize ⇒ DocHandler
Returns a new instance of DocHandler.
12 13 14 15 |
# File 'lib/plaintext/file_handler/external_command_handler/doc_handler.rb', line 12 def initialize @content_types = CONTENT_TYPES @command = Plaintext::Configuration['catdoc'] || DEFAULT end |