molten_core 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/molten_core/array.rb +4 -2
- data/lib/molten_core/version.rb +1 -1
- metadata +1 -1
data/lib/molten_core/array.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'active_support/core_ext/array/extract_options'
|
2
|
+
|
1
3
|
class Array
|
2
4
|
def delete!(default = nil, &block)
|
3
5
|
index_of_item = self.index(&block)
|
@@ -22,10 +24,10 @@ class Array
|
|
22
24
|
end
|
23
25
|
|
24
26
|
def with_extractable_options!
|
25
|
-
options
|
27
|
+
options = self.extract_options!
|
26
28
|
|
27
29
|
yield args, options
|
28
30
|
|
29
|
-
|
31
|
+
self << options unless options.empty?
|
30
32
|
end
|
31
33
|
end
|
data/lib/molten_core/version.rb
CHANGED