mpatch 2.12.1 → 2.12.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/mpatch/array.rb +9 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cce740c0afefee5224f91bbc2ba891161b4f87a
4
- data.tar.gz: 9da66aae2d2541169155c6fb2abef68e8ab9d5e1
3
+ metadata.gz: 2c8f031124d804afde0b73c125d9bdc3721dfdd3
4
+ data.tar.gz: 6d15992b1b8bc0e338664c84c5d3e2449dd37691
5
5
  SHA512:
6
- metadata.gz: d59313b3e7bfdfdabc0bdbeab699d2ee87b49f6ebc0c5eed92944680471397bd2ecf9a74909a6c9e4a69a88f4b46cb1dedfe79a52c87f1e11251a926e6d32101
7
- data.tar.gz: a1568eddf4b059d9d468cd2ccc864a781acd01392fefcabb338adb089001bccb11b05cd4f78e64c6f05d805df5915e0b35402038cafca60dc4bc5546b6dd342b
6
+ metadata.gz: 3a6761803f301471d1eaf20e368ad35ef09be805b80b9201a338fa15c14782484d2b853ca6cdf23a83702665b4e60b2d7bc6df547ca42491fe0243e45f8d7a88
7
+ data.tar.gz: 183aeeff5088cbfa6d19ee96be384ea18df6631e9617c5dccfbb1ecd53273907cb0a10554d531316039b24bd2d8cbe5625d90b407c16990e3d9727944b94638f
data/VERSION CHANGED
@@ -1,2 +1,2 @@
1
- 2.12.1
1
+ 2.12.2
2
2
 
@@ -161,13 +161,19 @@ module MPatch
161
161
  alias :cut_class! :extract_class!
162
162
 
163
163
  # generate params structure from array
164
- # *args - options {}
164
+ # *args - args_options {}
165
165
  def extract_options!
166
- options= self.extract_class! ::Hash
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.1
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-09 00:00:00.000000000 Z
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