Class: Applitools::Calabash::Target
- Inherits:
-
Object
- Object
- Applitools::Calabash::Target
- Includes:
- FluentInterface
- Defined in:
- lib/applitools/calabash/target.rb
Instance Attribute Summary collapse
-
#floating_regions ⇒ Object
Returns the value of attribute floating_regions.
-
#ignored_regions ⇒ Object
Returns the value of attribute ignored_regions.
-
#options ⇒ Object
Returns the value of attribute options.
-
#region_to_check ⇒ Object
Returns the value of attribute region_to_check.
Instance Method Summary collapse
- #fully ⇒ Object
- #ignore(region = nil) ⇒ Object
-
#initialize ⇒ Target
constructor
A new instance of Target.
- #region(region = nil) ⇒ Object
Constructor Details
#initialize ⇒ Target
Returns a new instance of Target.
10 11 12 13 14 15 16 |
# File 'lib/applitools/calabash/target.rb', line 10 def initialize self.ignored_regions = [] self.floating_regions = [] self. = { trim: false } end |
Instance Attribute Details
#floating_regions ⇒ Object
Returns the value of attribute floating_regions.
8 9 10 |
# File 'lib/applitools/calabash/target.rb', line 8 def floating_regions @floating_regions end |
#ignored_regions ⇒ Object
Returns the value of attribute ignored_regions.
8 9 10 |
# File 'lib/applitools/calabash/target.rb', line 8 def ignored_regions @ignored_regions end |
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/applitools/calabash/target.rb', line 8 def @options end |
#region_to_check ⇒ Object
Returns the value of attribute region_to_check.
8 9 10 |
# File 'lib/applitools/calabash/target.rb', line 8 def region_to_check @region_to_check end |
Instance Method Details
#fully ⇒ Object
18 19 20 21 |
# File 'lib/applitools/calabash/target.rb', line 18 def fully [:stitch_content] = true self end |
#ignore(region = nil) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/applitools/calabash/target.rb', line 23 def ignore(region = nil) if region Applitools::ArgumentGuard.is_a? region, 'region', Applitools::Calabash::CalabashElement ignored_regions << region.region else self.ignored_regions = [] end self end |
#region(region = nil) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/applitools/calabash/target.rb', line 33 def region(region = nil) if region case region when Applitools::Calabash::CalabashElement, Applitools::Region self.region_to_check = region else self.region_to_check = nil raise( Applitools::EyesIllegalArgument, 'Expected region to be instance of Applitools::Calabash::CalabashElement or Applitools::Region' ) end else self.region_to_check = nil end self end |