Class: Applitools::FixedCutProvider
- Inherits:
-
Object
- Object
- Applitools::FixedCutProvider
- Defined in:
- lib/applitools/core/fixed_cut_provider.rb
Overview
Provides ‘cut’ method which is used to cut screen shots
Instance Method Summary collapse
- #cut(image) ⇒ Object
-
#initialize(crop_region, header, left, right, footer) ⇒ FixedCutProvider
constructor
Creates a FixedCutProvider instance.
Constructor Details
#initialize(crop_region, header, left, right, footer) ⇒ FixedCutProvider
Creates a FixedCutProvider instance
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/applitools/core/fixed_cut_provider.rb', line 18 def initialize(*args) self.region = nil self.left = 0 self.header = 0 self.right = 0 self. = 0 case args.length when 1 initialize_by_rectangle(args[0]) when 4 initialize_by_fields(*args) end end |
Instance Method Details
#cut(image) ⇒ Object
32 33 34 |
# File 'lib/applitools/core/fixed_cut_provider.rb', line 32 def cut(image) Applitools::Utils::ImageUtils.cut! image, crop_region(image) end |