mpatch 2.12.1 → 2.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/mpatch/array.rb +9 -3
- 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: 2c8f031124d804afde0b73c125d9bdc3721dfdd3
|
4
|
+
data.tar.gz: 6d15992b1b8bc0e338664c84c5d3e2449dd37691
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a6761803f301471d1eaf20e368ad35ef09be805b80b9201a338fa15c14782484d2b853ca6cdf23a83702665b4e60b2d7bc6df547ca42491fe0243e45f8d7a88
|
7
|
+
data.tar.gz: 183aeeff5088cbfa6d19ee96be384ea18df6631e9617c5dccfbb1ecd53273907cb0a10554d531316039b24bd2d8cbe5625d90b407c16990e3d9727944b94638f
|
data/VERSION
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
2.12.
|
1
|
+
2.12.2
|
2
2
|
|
data/lib/mpatch/array.rb
CHANGED
@@ -161,13 +161,19 @@ module MPatch
|
|
161
161
|
alias :cut_class! :extract_class!
|
162
162
|
|
163
163
|
# generate params structure from array
|
164
|
-
# *args -
|
164
|
+
# *args - args_options {}
|
165
165
|
def extract_options!
|
166
|
-
|
167
|
-
return ::Hash[*options]
|
166
|
+
return self.extract_class!(::Hash).reduce({},:merge!)
|
168
167
|
end
|
169
168
|
alias :extract_hash! :extract_options!
|
170
169
|
|
170
|
+
# generate params structure from array
|
171
|
+
# *args + args_options {}
|
172
|
+
def extract_options
|
173
|
+
return self.dup.extract_class!(::Hash).reduce({},:merge!)
|
174
|
+
end
|
175
|
+
alias :extract_hash :extract_options
|
176
|
+
|
171
177
|
# map hash will work just alike map but instead of an array it will return a hash obj
|
172
178
|
#
|
173
179
|
# [:hello, "world",:world , "hello"].map_hash{|k,v| [ k , 123] }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mpatch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.12.
|
4
|
+
version: 2.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Luzsi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is a collection of my Ruby monkey patches for making easer to use
|
14
14
|
the basic classes
|