axe-core-api 4.5.1.pre.7bf550f → 4.5.1.pre.9e72a1b

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74b3fcf5891aae2d534c003fdc09a56f8eb3e5108cfad5bb47e83bbdcc7aa9cc
4
- data.tar.gz: 99ca4be7824ffbc13027e80a5936a91710a5b857ca20b5cc33d1972b5e31477a
3
+ metadata.gz: ac49a5be19aecbe7271122ec837505cc8413070e680e9ff584a6611c46ecf7b5
4
+ data.tar.gz: f42f058f0499fc67057944ecd52f1dc0f63a05edc708ad6ab6cf8010ef4641b5
5
5
  SHA512:
6
- metadata.gz: b66f92feecc29db9937f7b41b84e8fb36073b367d7787e88a25b5e59699c02c5e6c7b0dd8e5a80b989e7286b55c5465f048cd6806662521ec75859ca2f9b5057
7
- data.tar.gz: feecbf49cd1463b56d76b15c2a92ce86f2c1d596ba570d65bb07ef6492974876b5b2d86d1e3d8f50dde06671a128985ab1cb45b8633ad41ad0f5ce8ac2c00496
6
+ metadata.gz: ff64663c9e06dae63c677904bb40aa527da7af465c7d9c20b6233a67a31082fe2036bc98d00eb8b14e1a81c76078b1f89bca60f54c926d88d89da2aa58177fdd
7
+ data.tar.gz: c923d1064ea5a7368db69ca2dfd7e380df5e19a1d7e246a5abdd91172ec10ae2baff8109ff1c26017ff36c7e2a0b5914ba6cbe3cf6eface2e5d75775befadd50
@@ -9,11 +9,11 @@ module Axe
9
9
  end
10
10
 
11
11
  def within(*selectors)
12
- @inclusion.concat selectors.map { |s| Array(Selector.new s) }
12
+ @inclusion.concat selectors.map { |s| Selector::normalize s }
13
13
  end
14
14
 
15
15
  def excluding(*selectors)
16
- @exclusion.concat selectors.map { |s| Array(Selector.new s) }
16
+ @exclusion.concat selectors.map { |s| Selector::normalize s }
17
17
  end
18
18
 
19
19
  def to_h
@@ -1,6 +1,18 @@
1
1
  module Axe
2
2
  module API
3
3
  class Selector
4
+ def self.normalize(s)
5
+ if s.is_a? Hash
6
+ if s.key? :iframe and s.key? :selector
7
+ Array(Selector.new s)
8
+ else
9
+ s
10
+ end
11
+ else
12
+ Array(Selector.new s)
13
+ end
14
+ end
15
+
4
16
  def initialize(s)
5
17
  @selector = case s
6
18
  when Array then s