Class: Applitools::AccessibilityRegion
- Defined in:
- lib/applitools/core/accessibility_region.rb
Constant Summary
Constants inherited from Region
Region::DEFAULT_SUBREGIONS_INTERSECTION, Region::EMPTY
Instance Attribute Summary collapse
-
#region_type ⇒ Object
Returns the value of attribute region_type.
Attributes inherited from Region
#height, #left, #padding, #top, #width
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(element, region_type) ⇒ AccessibilityRegion
constructor
A new instance of AccessibilityRegion.
- #to_hash ⇒ Object
- #with_padding ⇒ Object
Methods inherited from Region
#[], #bottom, #contains?, #current_padding, #empty?, from_location_size, #intersect, #intersecting?, #location, #location=, #make_empty, #middle_offset, #right, #scale_it!, #size, #size_equals?, #sub_regions, sub_regions_with_fixed_size, sub_regions_with_varying_size, #to_s
Constructor Details
#initialize(element, region_type) ⇒ AccessibilityRegion
Returns a new instance of AccessibilityRegion.
8 9 10 11 |
# File 'lib/applitools/core/accessibility_region.rb', line 8 def initialize(element, region_type) super(element.location.x, element.location.y, element.size.width, element.size.height) self.region_type = region_type end |
Instance Attribute Details
#region_type ⇒ Object
Returns the value of attribute region_type.
7 8 9 |
# File 'lib/applitools/core/accessibility_region.rb', line 7 def region_type @region_type end |
Instance Method Details
#==(other) ⇒ Object
21 22 23 |
# File 'lib/applitools/core/accessibility_region.rb', line 21 def ==(other) super && region_type == other.region_type end |
#to_hash ⇒ Object
13 14 15 |
# File 'lib/applitools/core/accessibility_region.rb', line 13 def to_hash super.merge(type: region_type) end |
#with_padding ⇒ Object
17 18 19 |
# File 'lib/applitools/core/accessibility_region.rb', line 17 def with_padding self end |