Class: Paperclip::FileCommandContentTypeDetector Deprecated
- Inherits:
-
Object
- Object
- Paperclip::FileCommandContentTypeDetector
- Defined in:
- lib/paperclip/file_command_content_type_detector.rb
Overview
Deprecated.
Will be removed in Paperclip 8.0. Use Paperclip::ContentTypeDetector instead.
Constant Summary collapse
- SENSIBLE_DEFAULT =
Deprecated.
Will be removed in Paperclip 8.0.
"application/octet-stream"
Instance Method Summary collapse
-
#detect ⇒ Object
deprecated
Deprecated.
Will be removed in Paperclip 8.0. Use
Paperclip::ContentTypeDetectorinstead. -
#initialize(filename) ⇒ FileCommandContentTypeDetector
constructor
deprecated
Deprecated.
Will be removed in Paperclip 8.0. Use
Paperclip::ContentTypeDetectorinstead.
Constructor Details
#initialize(filename) ⇒ FileCommandContentTypeDetector
Deprecated.
Will be removed in Paperclip 8.0. Use Paperclip::ContentTypeDetector instead.
Returns a new instance of FileCommandContentTypeDetector.
10 11 12 13 |
# File 'lib/paperclip/file_command_content_type_detector.rb', line 10 def initialize(filename) warn_deprecation @filename = filename end |
Instance Method Details
#detect ⇒ Object
Deprecated.
Will be removed in Paperclip 8.0. Use Paperclip::ContentTypeDetector instead.
16 17 18 19 |
# File 'lib/paperclip/file_command_content_type_detector.rb', line 16 def detect warn_deprecation Paperclip::Commands::UnixFile.detect_content_type(@filename) || SENSIBLE_DEFAULT end |