Class: Plaintext::RtfHandler
- Inherits:
-
ExternalCommandHandler
- Object
- FileHandler
- ExternalCommandHandler
- Plaintext::RtfHandler
- Defined in:
- lib/plaintext/file_handler/external_command_handler/rtf_handler.rb
Constant Summary collapse
- DEFAULT =
[ '/usr/bin/unrtf', '--nopict', '--text', '__FILE__' ].freeze
Constants inherited from ExternalCommandHandler
ExternalCommandHandler::DEFAULT_STREAM_ENCODING, ExternalCommandHandler::FILE_PLACEHOLDER
Instance Method Summary collapse
-
#initialize ⇒ RtfHandler
constructor
A new instance of RtfHandler.
Methods inherited from ExternalCommandHandler
#accept?, available?, #available?, #shellout, #text
Methods inherited from FileHandler
Constructor Details
#initialize ⇒ RtfHandler
Returns a new instance of RtfHandler.
8 9 10 11 |
# File 'lib/plaintext/file_handler/external_command_handler/rtf_handler.rb', line 8 def initialize @content_type = 'application/rtf' @command = Plaintext::Configuration['unrtf'] || DEFAULT end |