Class: Applitools::AppOutputWithScreenshot
- Inherits:
-
Object
- Object
- Applitools::AppOutputWithScreenshot
- Defined in:
- lib/applitools/core/app_output_with_screenshot.rb
Instance Attribute Summary collapse
-
#app_output ⇒ Object
readonly
Returns the value of attribute app_output.
-
#screenshot ⇒ Object
readonly
Returns the value of attribute screenshot.
Instance Method Summary collapse
-
#initialize(app_output, screenshot, allow_empty_screenshot = false) ⇒ AppOutputWithScreenshot
constructor
A new instance of AppOutputWithScreenshot.
- #screenshot_url ⇒ Object
- #to_hash ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(app_output, screenshot, allow_empty_screenshot = false) ⇒ AppOutputWithScreenshot
Returns a new instance of AppOutputWithScreenshot.
7 8 9 10 11 12 13 14 |
# File 'lib/applitools/core/app_output_with_screenshot.rb', line 7 def initialize(app_output, screenshot, allow_empty_screenshot = false) raise Applitools::EyesIllegalArgument.new 'app_output is not kind of Applitools::AppOutput' unless app_output.is_a? Applitools::AppOutput raise Applitools::EyesIllegalArgument.new 'screenshot is not kind of Applitools::EyesScreenshot' unless allow_empty_screenshot || screenshot.is_a?(Applitools::EyesScreenshot) @app_output = app_output @screenshot = screenshot end |
Instance Attribute Details
#app_output ⇒ Object (readonly)
Returns the value of attribute app_output.
5 6 7 |
# File 'lib/applitools/core/app_output_with_screenshot.rb', line 5 def app_output @app_output end |
#screenshot ⇒ Object (readonly)
Returns the value of attribute screenshot.
5 6 7 |
# File 'lib/applitools/core/app_output_with_screenshot.rb', line 5 def screenshot @screenshot end |
Instance Method Details
#screenshot_url ⇒ Object
24 25 26 |
# File 'lib/applitools/core/app_output_with_screenshot.rb', line 24 def screenshot_url app_output.screenshot_url end |
#to_hash ⇒ Object
16 17 18 |
# File 'lib/applitools/core/app_output_with_screenshot.rb', line 16 def to_hash app_output.to_hash end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/applitools/core/app_output_with_screenshot.rb', line 20 def to_s app_output.to_hash.to_s end |