Class: Applitools::MatchWindowData
- Inherits:
-
Object
- Object
- Applitools::MatchWindowData
- Defined in:
- lib/applitools/core/match_window_data.rb
Instance Attribute Summary collapse
-
#app_output ⇒ Object
(also: #appOutput)
Returns the value of attribute app_output.
-
#ignore_mismatch ⇒ Object
(also: #ignoreMismatch)
Returns the value of attribute ignore_mismatch.
-
#options ⇒ Object
Returns the value of attribute options.
-
#tag ⇒ Object
Returns the value of attribute tag.
-
#user_inputs ⇒ Object
(also: #userInputs)
Returns the value of attribute user_inputs.
Instance Method Summary collapse
-
#initialize(user_inputs, app_output, tag, ignore_mismatch, options = {}) ⇒ MatchWindowData
constructor
A new instance of MatchWindowData.
- #screenshot ⇒ Object
- #to_hash ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(user_inputs, app_output, tag, ignore_mismatch, options = {}) ⇒ MatchWindowData
Returns a new instance of MatchWindowData.
5 6 7 8 9 10 11 |
# File 'lib/applitools/core/match_window_data.rb', line 5 def initialize(user_inputs, app_output, tag, ignore_mismatch, = {}) self.user_inputs = user_inputs self.app_output = app_output self.tag = tag self.ignore_mismatch = ignore_mismatch self. = end |
Instance Attribute Details
#app_output ⇒ Object Also known as: appOutput
Returns the value of attribute app_output.
3 4 5 |
# File 'lib/applitools/core/match_window_data.rb', line 3 def app_output @app_output end |
#ignore_mismatch ⇒ Object Also known as: ignoreMismatch
Returns the value of attribute ignore_mismatch.
3 4 5 |
# File 'lib/applitools/core/match_window_data.rb', line 3 def ignore_mismatch @ignore_mismatch end |
#options ⇒ Object
Returns the value of attribute options.
3 4 5 |
# File 'lib/applitools/core/match_window_data.rb', line 3 def end |
#tag ⇒ Object
Returns the value of attribute tag.
3 4 5 |
# File 'lib/applitools/core/match_window_data.rb', line 3 def tag @tag end |
#user_inputs ⇒ Object Also known as: userInputs
Returns the value of attribute user_inputs.
3 4 5 |
# File 'lib/applitools/core/match_window_data.rb', line 3 def user_inputs @user_inputs end |
Instance Method Details
#screenshot ⇒ Object
13 14 15 |
# File 'lib/applitools/core/match_window_data.rb', line 13 def screenshot app_output.screenshot.image.to_blob end |
#to_hash ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/applitools/core/match_window_data.rb', line 21 def to_hash ary = [:userInputs, :appOutput, :tag, :ignoreMismatch, :options].map do |field| result = send(field) result = result.to_hash if result.respond_to? :to_hash [field, result] if [String, Symbol, Hash, Array, FalseClass, TrueClass].include? result.class end.compact Hash[ary] end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/applitools/core/match_window_data.rb', line 30 def to_s to_hash end |