Class: Applitools::ImageMatchSettings::Exact

Inherits:
Object
  • Object
show all
Includes:
Jsonable
Defined in:
lib/applitools/core/image_match_settings.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Jsonable

included, #json, #json_data

Constructor Details

#initializeExact

Returns a new instance of Exact.



88
89
90
91
92
93
# File 'lib/applitools/core/image_match_settings.rb', line 88

def initialize
  self.min_diff_intensity = 0
  self.min_diff_width = 0
  self.min_diff_height = 0
  self.match_threshold = 0
end

Class Method Details

.from_exact_options(options) ⇒ Object



78
79
80
81
82
83
84
85
# File 'lib/applitools/core/image_match_settings.rb', line 78

def from_exact_options(options)
  new.tap do |exact|
    exact.min_diff_intensity = options['MinDiffIntensity']
    exact.min_diff_width = options['MinDiffWidth']
    exact.min_diff_height = options['MinDiffHeight']
    exact.match_threshold = options['MatchThreshold']
  end
end

Instance Method Details

#==(other) ⇒ Object



95
96
97
98
99
100
# File 'lib/applitools/core/image_match_settings.rb', line 95

def ==(other)
  min_diff_intensity == other.min_diff_intensity &&
    min_diff_width == other.min_diff_width &&
    min_diff_height == other.min_diff_height &&
    match_threshold == other.match_threshold
end