Class: DotDiff::Comparible::ElementComparer

Inherits:
Base
  • Object
show all
Defined in:
lib/dotdiff/comparible/element_comparer.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, run

Constructor Details

This class inherits a constructor from DotDiff::Comparible::Base

Instance Method Details

#new_image_pathObject



17
18
19
# File 'lib/dotdiff/comparible/element_comparer.rb', line 17

def new_image_path
  snapshot.cropped_file
end

#runObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/dotdiff/comparible/element_comparer.rb', line 6

def run
  take_snapshot_and_crop

  if !File.exist?(snapshot.basefile)
    snapshot.resave_cropped_file
    [true, snapshot.basefile]
  else
    compare(snapshot.cropped_file)
  end
end