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.
8 9 10 11 |
# File 'lib/applitools/core/match_result.rb', line 8 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.
5 6 7 |
# File 'lib/applitools/core/match_result.rb', line 5 def response_hash @response_hash end |
#screenshot ⇒ Object
Returns the value of attribute screenshot.
6 7 8 |
# File 'lib/applitools/core/match_result.rb', line 6 def screenshot @screenshot end |
Instance Method Details
#as_expected? ⇒ Boolean
13 14 15 16 |
# File 'lib/applitools/core/match_result.rb', line 13 def as_expected? return response_hash['asExpected'] if [TrueClass, FalseClass].include? response_hash['asExpected'].class false end |