Class: Applitools::MatchWindowData
- Inherits:
-
Object
- Object
- Applitools::MatchWindowData
- Defined in:
- lib/eyes_selenium/eyes/match_window_data.rb
Instance Attribute Summary collapse
-
#app_output ⇒ Object
readonly
Returns the value of attribute app_output.
-
#ignore_mismatch ⇒ Object
readonly
Returns the value of attribute ignore_mismatch.
-
#screenshot ⇒ Object
readonly
Returns the value of attribute screenshot.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
-
#user_inputs ⇒ Object
readonly
Returns the value of attribute user_inputs.
Instance Method Summary collapse
-
#initialize(app_output, user_inputs = [], tag, ignore_mismatch, screenshot) ⇒ MatchWindowData
constructor
A new instance of MatchWindowData.
-
#to_hash ⇒ Object
IMPORTANT This method returns a hash WITHOUT the screenshot property.
Constructor Details
#initialize(app_output, user_inputs = [], tag, ignore_mismatch, screenshot) ⇒ MatchWindowData
Returns a new instance of MatchWindowData.
4 5 6 7 8 9 10 |
# File 'lib/eyes_selenium/eyes/match_window_data.rb', line 4 def initialize(app_output,user_inputs=[], tag, ignore_mismatch, screenshot) @user_inputs = user_inputs @app_output = app_output @tag = tag @ignore_mismatch = ignore_mismatch @screenshot = screenshot end |
Instance Attribute Details
#app_output ⇒ Object (readonly)
Returns the value of attribute app_output.
3 4 5 |
# File 'lib/eyes_selenium/eyes/match_window_data.rb', line 3 def app_output @app_output end |
#ignore_mismatch ⇒ Object (readonly)
Returns the value of attribute ignore_mismatch.
3 4 5 |
# File 'lib/eyes_selenium/eyes/match_window_data.rb', line 3 def ignore_mismatch @ignore_mismatch end |
#screenshot ⇒ Object (readonly)
Returns the value of attribute screenshot.
3 4 5 |
# File 'lib/eyes_selenium/eyes/match_window_data.rb', line 3 def screenshot @screenshot end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
3 4 5 |
# File 'lib/eyes_selenium/eyes/match_window_data.rb', line 3 def tag @tag end |
#user_inputs ⇒ Object (readonly)
Returns the value of attribute user_inputs.
3 4 5 |
# File 'lib/eyes_selenium/eyes/match_window_data.rb', line 3 def user_inputs @user_inputs end |
Instance Method Details
#to_hash ⇒ Object
IMPORTANT This method returns a hash WITHOUT the screenshot property. This is on purspose! The screenshot should not be included as part of the json.
14 15 16 17 |
# File 'lib/eyes_selenium/eyes/match_window_data.rb', line 14 def to_hash {userInputs: user_inputs.map(&:to_hash), appOutput: Hash[app_output.each_pair.to_a], tag: @tag, ignoreMismatch: @ignore_mismatch} end |