Class: ImageDiff::Differ::Results::Result

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

Overview

Comparison result

Direct Known Subclasses

PixelRegression, ReferenceFileNotFound

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(snapshot) ⇒ Result

Returns a new instance of Result.



10
11
12
13
# File 'lib/image_diff/differ/results/result.rb', line 10

def initialize(snapshot)
  @snapshot = snapshot
  add_to_results_list
end

Instance Attribute Details

#snapshotObject (readonly)

Returns the value of attribute snapshot.



8
9
10
# File 'lib/image_diff/differ/results/result.rb', line 8

def snapshot
  @snapshot
end

Instance Method Details

#add_to_results_listObject



15
16
17
# File 'lib/image_diff/differ/results/result.rb', line 15

def add_to_results_list
  List.instance[@snapshot.filepath] << self
end