chickpea 0.2.0 → 0.2.1

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: 739146440bbc01fd856df4b4bd2b4464386b9a82883bb6a75c9571cf80fc65ed
4
- data.tar.gz: 3c896a3f9cc9d950127607389e28d024ad1edb97e30b8211a412d6a1ec846c1d
3
+ metadata.gz: f57bec3d3f55c1041f65ce22af210c6e332f8053b1a49fc6fa63f742e70cd114
4
+ data.tar.gz: 4d2321b65720691345c2cfb9a1c80e49e9ef9dff8904d2e45a2995bfaaac3acc
5
5
  SHA512:
6
- metadata.gz: 63b1d663180e3cc38786a6b1008999c952f5fe2f7432d1329c58ce4e2885ecdf7d92784af7f4f7087945f2b48d71ddd68a3c5d19ebd33aa21c377d70ae1a51e2
7
- data.tar.gz: 2bbdb71c207995dcf41320f0b3f0361fa5c25c2998047cba29784133165fbc68320bc910ae9c1536bb8db920b1772212516976079bb5522f881d7124eefff6ce
6
+ metadata.gz: 1e25b877d61f535e68aafbbfc7f6d2db09a14abc07a67d8a6a9461020b4c370beeb4a23808a1aa4d2538f3a4684f5686bf718d8a9b5b8d3189188c1ba0d69778
7
+ data.tar.gz: c339809b3c7d0ec9a5f8933788c7ed9f642454e8fd7a2905b1f43a7c1e5df9ea5330f815845c0039298f74ef8c41972188504353ec0b2c8816bc8430a05493ac
@@ -1,3 +1,3 @@
1
1
  module Chickpea
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
data/lib/chickpea.rb CHANGED
@@ -42,6 +42,18 @@ module Chickpea
42
42
  klass.define_method(key) { obj }
43
43
  end
44
44
 
45
+ klass.define_method(:to_h) do
46
+ hash.map do |k, v|
47
+ [k, send(k).then { |r| v.is_a?(Hash) ? r.to_h : r }]
48
+ end.to_h
49
+ end
50
+
51
+ klass.define_method(:merge!) do |hash|
52
+ hash.each do |k, v|
53
+ v.is_a?(Hash) ? send(k).merge!(v) : send(:"#{k}=", v)
54
+ end
55
+ end
56
+
45
57
  klass.new
46
58
  end
47
59
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chickpea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stone Tickle