Class: Paperclip::FileCommandContentTypeDetector

Inherits:
Object
  • Object
show all
Defined in:
lib/paperclip/file_command_content_type_detector.rb

Constant Summary

SENSIBLE_DEFAULT =
"application/octet-stream"

Instance Method Summary (collapse)

Constructor Details

- (FileCommandContentTypeDetector) initialize(filename)

Returns a new instance of FileCommandContentTypeDetector



5
6
7
# File 'lib/paperclip/file_command_content_type_detector.rb', line 5

def initialize(filename)
  @filename = filename
end

Instance Method Details

- (Object) detect



9
10
11
# File 'lib/paperclip/file_command_content_type_detector.rb', line 9

def detect
  type_from_file_command
end