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: eae0841086c0da8d042453e9a3bbb184099e134b1af550b936361df36f4c1503
4
- data.tar.gz: 95851be8f55f8da1b518b409db283394672f94fe1995cf74bd5bbb5e1054f17f
3
+ metadata.gz: 287c58d9e442e535296ee034c4e7cb254eeafb3d1b00b001daa264f142ac1e9c
4
+ data.tar.gz: fd72bb7514e1a05dd4b19db2221412199c29d1ce840e1c1460f336e0dc1b2c10
5
5
  SHA512:
6
- metadata.gz: 175c6f0ebf20d033532cbe171d532aa24f9461facb8951f630fdfd672710b7f61994374b6f5ecd3f7b944ba039d3bd67012809e36769cd3a582ef1a4fa768d58
7
- data.tar.gz: 41fa00c185d23a48c8c89bcd5d42d076a4e555643453bd382d2031f335466a3949106555b09b8d72a5db5f94e77d68f0413916a114eec2e24c60d23e9067d9e8
6
+ metadata.gz: 274896ccf6bd53fe6c079aefe732655b7ef6bd78149eef90cf61d7c8abb0ed9bce7a6265c423e889d5ae6bc3fe5b1075d0cef76f07e54fbf8aa32e3b32bfe073
7
+ data.tar.gz: 5eacac5f15f645f41847159ca4a5824b0ae0360aabd2e24b6461509f87b67bad055e74743856eb2faa6fbb2b71b84200a43cb684b919eb282f36795ace33d757
@@ -1,8 +1,8 @@
1
1
  require_relative 'enumerable'
2
2
 
3
3
  module DeeplyEnumerable
4
- module ArrayExtensionklass
5
- def self.included
4
+ module ArrayExtension
5
+ def self.included klass
6
6
  klass.class_eval do
7
7
  include DeeplyEnumerable::Enumerable
8
8
  end
@@ -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(&:safe_constantize).compact
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
- next if self.class.unenumerable.any? { |unenumerable_klass| object.is_a?(unenumerable_klass) }
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
 
@@ -1,3 +1,3 @@
1
1
  module DeeplyEnumerable
2
- VERSION = '0.9.2'
2
+ VERSION = '0.9.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deeply_enumerable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - chaunce