Class: Applitools::MatchResult
- Inherits:
-
Object
- Object
- Applitools::MatchResult
- Defined in:
- lib/applitools/core/match_result.rb
Instance Attribute Summary collapse
-
#response_hash ⇒ Object
readonly
Returns the value of attribute response_hash.
-
#screenshot ⇒ Object
Returns the value of attribute screenshot.
Instance Method Summary collapse
- #as_expected? ⇒ Boolean
-
#initialize(response_hash) ⇒ MatchResult
constructor
A new instance of MatchResult.
Constructor Details
#initialize(response_hash) ⇒ MatchResult
Returns a new instance of MatchResult.
6 7 8 9 |
# File 'lib/applitools/core/match_result.rb', line 6 def initialize(response_hash) Applitools::ArgumentGuard.hash response_hash, 'response hash', ['asExpected'] @response_hash = response_hash end |
Instance Attribute Details
#response_hash ⇒ Object (readonly)
Returns the value of attribute response_hash.
3 4 5 |
# File 'lib/applitools/core/match_result.rb', line 3 def response_hash @response_hash end |
#screenshot ⇒ Object
Returns the value of attribute screenshot.
4 5 6 |
# File 'lib/applitools/core/match_result.rb', line 4 def screenshot @screenshot end |
Instance Method Details
#as_expected? ⇒ Boolean
11 12 13 14 |
# File 'lib/applitools/core/match_result.rb', line 11 def as_expected? return response_hash['asExpected'] if [TrueClass, FalseClass].include? response_hash['asExpected'].class false end |