Class: Applitools::Screenshot::Image
- Inherits:
-
Applitools::Screenshot
- Object
- Delegator
- Applitools::Screenshot
- Applitools::Screenshot::Image
- Defined in:
- lib/applitools/core/screenshot.rb
Instance Attribute Summary collapse
-
#image ⇒ Object
readonly
Returns the value of attribute image.
Instance Method Summary collapse
- #__getobj__ ⇒ Object
- #__setobj__(obj) ⇒ Object
-
#initialize(image) ⇒ Image
constructor
A new instance of Image.
- #update!(image) ⇒ Object
Methods inherited from Applitools::Screenshot
from_any_image, from_datastream, from_image, from_region, #method_missing, #respond_to_missing?, #square
Constructor Details
#initialize(image) ⇒ Image
Returns a new instance of Image.
99 100 101 102 103 |
# File 'lib/applitools/core/screenshot.rb', line 99 def initialize(image) Applitools::ArgumentGuard.not_nil(image, 'image') Applitools::ArgumentGuard.is_a?(image, 'image', ::ChunkyPNG::Image) @image = image end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Applitools::Screenshot
Instance Attribute Details
#image ⇒ Object (readonly)
Returns the value of attribute image.
97 98 99 |
# File 'lib/applitools/core/screenshot.rb', line 97 def image @image end |
Instance Method Details
#__getobj__ ⇒ Object
111 112 113 |
# File 'lib/applitools/core/screenshot.rb', line 111 def __getobj__ @image end |
#__setobj__(obj) ⇒ Object
115 116 117 |
# File 'lib/applitools/core/screenshot.rb', line 115 def __setobj__(obj) @image = obj end |
#update!(image) ⇒ Object
105 106 107 108 109 |
# File 'lib/applitools/core/screenshot.rb', line 105 def update!(image) Applitools::ArgumentGuard.not_nil(image, 'image') Applitools::ArgumentGuard.is_a?(image, 'image', ::ChunkyPNG::Image) @image = image end |