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
Methods included from FluentInterface
#ignore_caret, #ignore_mismatch, included, #match_level, #timeout, #trim
Methods included from MatchLevelSetter
Constructor Details
#initialize ⇒ Target
Returns a new instance of Target.
8 9 10 11 12 13 14 |
# File 'lib/applitools/calabash/target.rb', line 8 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.
6 7 8 |
# File 'lib/applitools/calabash/target.rb', line 6 def floating_regions @floating_regions end |
#ignored_regions ⇒ Object
Returns the value of attribute ignored_regions.
6 7 8 |
# File 'lib/applitools/calabash/target.rb', line 6 def ignored_regions @ignored_regions end |
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/applitools/calabash/target.rb', line 6 def @options end |
#region_to_check ⇒ Object
Returns the value of attribute region_to_check.
6 7 8 |
# File 'lib/applitools/calabash/target.rb', line 6 def region_to_check @region_to_check end |
Instance Method Details
#fully ⇒ Object
16 17 18 19 |
# File 'lib/applitools/calabash/target.rb', line 16 def fully [:stitch_content] = true self end |
#ignore(region = nil) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/applitools/calabash/target.rb', line 21 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
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/applitools/calabash/target.rb', line 31 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 |