Class: Imageproxy::Compare

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

Instance Method Summary collapse

Constructor Details

#initialize(a, b) ⇒ Compare

Returns a new instance of Compare.



5
6
7
8
# File 'lib/imageproxy/compare.rb', line 5

def initialize(a, b)
  @path_a = to_path(a)
  @path_b = to_path(b)
end

Instance Method Details

#executeObject



10
11
12
# File 'lib/imageproxy/compare.rb', line 10

def execute
  execute_command %'compare -metric AE -fuzz 10% "#{@path_a}" "#{@path_b}" "#{Tempfile.new("compare").path}"'
end