Class: Imageproxy::IdentifyFormat

Inherits:
Command
  • Object
show all
Defined in:
lib/imageproxy/identify_format.rb

Instance Method Summary collapse

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

#executeObject



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