optimizely-sdk 4.0.1 → 5.0.0.pre.beta

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: c6c3ed7012fac749fdca7c3c328eed7157fbc506f7d69ccebbae2d8064f23efd
4
- data.tar.gz: 0e3e8c5b066fed0afbb542a41441e84da94fa2c92aa323e995eb59a1323d0e45
3
+ metadata.gz: 0b1f844a1fb9c83e93efd101ccdb43ce162d11283b45c47e5d2f73a80a663bb4
4
+ data.tar.gz: d2b2e1fb6f1f38b523042503dbb547691f8023db8255f192cd0711c8f8498dc7
5
5
  SHA512:
6
- metadata.gz: d04f0b497e127336af09e8ddf071767614e2a8c8bb63ab5e6681e18faefcc105864633ca667d79706637b2c49d5e1324ef63d225fb7e4f7388fce785be443854
7
- data.tar.gz: 35d476afe2f1ff9a8d10367a59cd153485dd169324bd8f4f43faba56939bfbd85489160ca5453856bbaa16302357eebec603a9821e2551bb92df7290342d3deb
6
+ metadata.gz: 54b774c53b729b87d8e3e889713bb9cf54954a9b95089806406eccf2f3bfbc85e7c1a75380964ecc5de6a946cdcf96f918d8be38807133dfe0b85c1d9d45380c
7
+ data.tar.gz: 756c2a224ad8a4b7946c950599d29ea824ad0c1789ce254e76b86eeac4d502901dc5d5510f25e26207a66c34bad7eea732a950db79199d90ec1dfac4c56c07ab
@@ -112,12 +112,12 @@ module Optimizely
112
112
  # Returns array of segment names.
113
113
  segments = []
114
114
 
115
- conditions.each do |condition|
116
- case condition
117
- when Array
115
+ case conditions
116
+ when Hash
117
+ segments.push(conditions['value']) if conditions.fetch('match', nil) == 'qualified'
118
+ when Array
119
+ conditions.each do |condition|
118
120
  segments.concat @parse_segments.call(condition)
119
- when Hash
120
- segments.push(condition['value']) if condition.fetch('match', nil) == 'qualified'
121
121
  end
122
122
  end
123
123