Class: Applitools::Selenium::MatchWindowData
- Inherits:
-
Object
- Object
- Applitools::Selenium::MatchWindowData
- Defined in:
- lib/applitools/selenium/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, tag, ignore_mismatch, screenshot, user_inputs = []) ⇒ 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, tag, ignore_mismatch, screenshot, user_inputs = []) ⇒ MatchWindowData
Returns a new instance of MatchWindowData.
5 6 7 8 9 10 11 |
# File 'lib/applitools/selenium/match_window_data.rb', line 5 def initialize(app_output, tag, ignore_mismatch, screenshot, user_inputs = []) @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/applitools/selenium/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/applitools/selenium/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/applitools/selenium/match_window_data.rb', line 3 def screenshot @screenshot end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
3 4 5 |
# File 'lib/applitools/selenium/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/applitools/selenium/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 purpose! The screenshot should not be included as part of the json.
15 16 17 18 19 20 21 22 |
# File 'lib/applitools/selenium/match_window_data.rb', line 15 def to_hash { user_inputs: user_inputs.map(&:to_hash), app_output: Hash[app_output.each_pair.to_a], tag: @tag, ignore_mismatch: @ignore_mismatch } end |