Class: Applitools::AppOutputWithScreenshot

Inherits:
Object
  • Object
show all
Defined in:
lib/applitools/core/app_output_with_screenshot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_outputObject (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

#screenshotObject (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_urlObject



24
25
26
# File 'lib/applitools/core/app_output_with_screenshot.rb', line 24

def screenshot_url
  app_output.screenshot_url
end

#to_hashObject



16
17
18
# File 'lib/applitools/core/app_output_with_screenshot.rb', line 16

def to_hash
  app_output.to_hash
end

#to_sObject



20
21
22
# File 'lib/applitools/core/app_output_with_screenshot.rb', line 20

def to_s
  app_output.to_hash.to_s
end