soaspec 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/lib/soaspec/hash_methods.rb +13 -12
- data/lib/soaspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31e59104f7fe53eab3382cd0e569c6372ceac6f2
|
4
|
+
data.tar.gz: bd767b72d3ec217ac2d57416660e5fd848cf7b91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77813ae5339c6ad088f89896d5b67fd63e94b4c5d1c4a979632011dcce5a71c3d87d642d1e560196f65da22279ceac443d9e59a7fac436fabb5720af14cdb1aa
|
7
|
+
data.tar.gz: 1ecd9df640c74a646ed9248f24889c2ae41e681fbcb420e154c4aed6344276c2b1acc4778e280bf086e2858e1978b8a4193e495243e3856f9dea9ba325b9d557
|
data/ChangeLog
CHANGED
data/lib/soaspec/hash_methods.rb
CHANGED
@@ -17,7 +17,8 @@ class Hash
|
|
17
17
|
result = []
|
18
18
|
result << self[key]
|
19
19
|
self.values.each do |hash_value|
|
20
|
-
|
20
|
+
next if hash_value.is_a? Array
|
21
|
+
values = [hash_value]
|
21
22
|
values.each do |value|
|
22
23
|
result += value.find_all_values_for(key) if value.is_a? Hash
|
23
24
|
end
|
@@ -51,20 +52,20 @@ class Hash
|
|
51
52
|
# @param [Key] Key within hash to iterate through
|
52
53
|
def each_if_not_null(key)
|
53
54
|
case key.class.to_s
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
end
|
55
|
+
when 'String'
|
56
|
+
if self[key]
|
57
|
+
self[key].each do |list_item|
|
58
|
+
yield(list_item)
|
59
59
|
end
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
60
|
+
end
|
61
|
+
when 'Array', 'Hash'
|
62
|
+
if self[key[0]]
|
63
|
+
if self[key[0]][key[1]]
|
64
|
+
self[key[0]][key[1]].each do |list_item|
|
65
|
+
yield(list_item)
|
66
66
|
end
|
67
67
|
end
|
68
|
+
end
|
68
69
|
end
|
69
70
|
end
|
70
71
|
|
data/lib/soaspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soaspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SamuelGarrattIQA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|