deeply_enumerable 0.9.2 → 0.9.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 287c58d9e442e535296ee034c4e7cb254eeafb3d1b00b001daa264f142ac1e9c
|
4
|
+
data.tar.gz: fd72bb7514e1a05dd4b19db2221412199c29d1ce840e1c1460f336e0dc1b2c10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 274896ccf6bd53fe6c079aefe732655b7ef6bd78149eef90cf61d7c8abb0ed9bce7a6265c423e889d5ae6bc3fe5b1075d0cef76f07e54fbf8aa32e3b32bfe073
|
7
|
+
data.tar.gz: 5eacac5f15f645f41847159ca4a5824b0ae0360aabd2e24b6461509f87b67bad055e74743856eb2faa6fbb2b71b84200a43cb684b919eb282f36795ace33d757
|
@@ -29,12 +29,12 @@ module DeeplyEnumerable
|
|
29
29
|
deep_rebuild(object).deep_compact(remove_emptied_elements, remove_empty_elements)
|
30
30
|
end
|
31
31
|
|
32
|
-
private
|
33
|
-
|
34
32
|
def unenumerable
|
35
|
-
@unenumerable ||= UNENUMERABLE.map
|
33
|
+
@unenumerable ||= UNENUMERABLE.map { |unenumerable| unenumerable.constantize rescue nil }.compact
|
36
34
|
end
|
37
35
|
|
36
|
+
private
|
37
|
+
|
38
38
|
def check_object_class(object)
|
39
39
|
raise TypeError, "object must be a #{superclass.name}" unless object.kind_of?(superclass)
|
40
40
|
end
|
@@ -45,7 +45,7 @@ module DeeplyEnumerable
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def unenumerable_object?(object)
|
48
|
-
|
48
|
+
self.class.unenumerable.any? { |unenumerable_klass| object.is_a?(unenumerable_klass) }
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
@@ -38,7 +38,6 @@ module DeeplyEnumerable
|
|
38
38
|
next unless compact_method
|
39
39
|
|
40
40
|
original_empty = value.respond_to?(:empty?) ? value.empty? : value.respond_to?(:none?) ? value.none? : false
|
41
|
-
debugger
|
42
41
|
compact_value = value.send(*[compact_method].concat(value.method(compact_method).parameters.collect { |_,param| binding.local_variable_get(param) } ).compact) || value
|
43
42
|
compact_empty = compact_value.respond_to?(:empty?) ? compact_value.empty? : compact_value.respond_to?(:none?) ? compact_value.none? : false
|
44
43
|
|