Class: ImageDiff::Differ::Results::PixelRegression

Inherits:
Result
  • Object
show all
Defined in:
lib/image_diff/differ/results/result.rb

Overview

Pixel Regression

Instance Attribute Summary

Attributes inherited from Result

#snapshot

Instance Method Summary collapse

Methods inherited from Result

#add_to_results_list

Constructor Details

#initialize(reference, snapshot, error, comparison) ⇒ PixelRegression

Returns a new instance of PixelRegression.



26
27
28
29
30
31
# File 'lib/image_diff/differ/results/result.rb', line 26

def initialize(reference, snapshot, error, comparison)
  @error = error
  @comparison = comparison
  @reference = reference
  super(snapshot)
end

Instance Method Details

#outputObject



33
34
35
36
37
38
39
40
41
# File 'lib/image_diff/differ/results/result.rb', line 33

def output
  <<~BODY
    ----------------------
    Reference file: #{@reference}
    Screenshot:  #{snapshot.filepath}.png
    Difference: #{@comparison}
    ----------------------
  BODY
end