Class: Imageproxy::IdentifyFormat
- Defined in:
- lib/imageproxy/identify_format.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(file) ⇒ IdentifyFormat
constructor
A new instance of IdentifyFormat.
Constructor Details
#initialize(file) ⇒ IdentifyFormat
Returns a new instance of IdentifyFormat.
5 6 7 |
# File 'lib/imageproxy/identify_format.rb', line 5 def initialize(file) @file = file end |
Instance Method Details
#execute ⇒ Object
9 10 11 12 |
# File 'lib/imageproxy/identify_format.rb', line 9 def execute result = execute_command %'identify -format "%m" #{@file.path}' result.start_with?("identify:") ? nil : result end |