Class: ImageDiff::Differ::Differences
- Inherits:
-
Object
- Object
- ImageDiff::Differ::Differences
- Extended by:
- Forwardable
- Includes:
- Singleton
- Defined in:
- lib/image_diff/differ/differ.rb
Overview
Singleton to store differences
Class Method Summary collapse
-
.result ⇒ Object
TODO: output failures separately from reference file misses also produce screenshot on failure.
Instance Method Summary collapse
- #[]=(key, str) ⇒ Object
-
#initialize(list = {}) ⇒ Differences
constructor
A new instance of Differences.
Constructor Details
#initialize(list = {}) ⇒ Differences
Returns a new instance of Differences.
36 37 38 |
# File 'lib/image_diff/differ/differ.rb', line 36 def initialize(list = {}) @list = list end |
Class Method Details
.result ⇒ Object
TODO: output failures separately from reference file misses
also produce screenshot on failure
46 47 48 |
# File 'lib/image_diff/differ/differ.rb', line 46 def self.result instance.map { |diff| puts(*diff) } end |
Instance Method Details
#[]=(key, str) ⇒ Object
40 41 42 |
# File 'lib/image_diff/differ/differ.rb', line 40 def []=(key, str) @list[key] = str unless str.chomp.empty? end |