iteraptor 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iteraptor/version.rb +1 -1
- data/lib/iteraptor.rb +2 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 195bc8d3aa981fe3a07eb7b9fd8b5ed90cad61f4
|
4
|
+
data.tar.gz: 1a41e0a2733f5f515b9d4e1d88c58a22bac2b489
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5807c5d3f97ec4f3624a42657fcd3afc7fd151b6ed2c90552c4ecfc74c729c0151caac590bb0dd0973655683034e2a16cd9f9577dd966846fd74fcd4c0914707
|
7
|
+
data.tar.gz: c6c16010e9f3468ec60971c07af8a209c0c3569b22d8dfdd610898eea758a2be7949016adaddd58cd295daf9fdb1d50caaf01e83facdb21d47aa9d9313334abe
|
data/lib/iteraptor/version.rb
CHANGED
data/lib/iteraptor.rb
CHANGED
@@ -34,12 +34,11 @@ module Iteraptor
|
|
34
34
|
|
35
35
|
def compactar **params
|
36
36
|
(is_a?(Array) ? compact : self).
|
37
|
-
mapa(yield_all: true) do |
|
37
|
+
mapa(yield_all: true) do |_p, (k, v)|
|
38
38
|
v.is_a?(Array) ? [k, v.compact] : [k, v]
|
39
39
|
end.mapa(**params) do |parent, (k, v)|
|
40
40
|
p = parent.split(H.iteraptor_delimiter(params)).last
|
41
|
-
|
42
|
-
(p.to_i.to_s != p && v.nil?) ? nil : [k, v]
|
41
|
+
p.to_i.to_s != p && v.nil? ? nil : [k, v]
|
43
42
|
end.tap do |this|
|
44
43
|
break {} if this.empty? && is_a?(Hash)
|
45
44
|
end
|