config-hash 0.8.0 → 0.9.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28e1a2fd046a13152c40277d6a52dae3f04fbd4957b2facd415a8a8aea9f807a
4
- data.tar.gz: 5bee5b7a7142da9dae88d0b85cec63077094d3a82e54c412f13ceb1b7e3ee8ae
3
+ metadata.gz: d402199a83e315a08c1ec966be61cacd3c611ad159266a9e5302694fe431f986
4
+ data.tar.gz: 8456cec67ff0dc3b0a7700dbb7d0765334068c8392a836aff9c6d0a3f626e92f
5
5
  SHA512:
6
- metadata.gz: 954636ece16a470f6804526919573b98162e51693140d9b9f29bf7172d6486dadd3009c81633949841e7eda235495789c5f39ebc5e3d38d515468ae7a3b5f291
7
- data.tar.gz: 896bc7da6debac15210f729fb390cc3ad4b9e088116cc7471e2d2de13f77a8e869cb6a69bea9021637613d034af3ff68195d5b7c3af891fb21aaa8829f1bd47c
6
+ metadata.gz: 46202cd059c38067fed89a376c5db4dedf8a03329df78cfcfabfec930f80bbd810771fdbec14280ff868c932b6b589c9be11065f7ee4503fcb8276ecf109579c
7
+ data.tar.gz: f77bf4bd20d790219cee22b6beb84ef72b4f649c3a5afe2abf9eac20a24696b5aa96188bfa98ff9347535c3789453f8e8e07fc0b8c16782f4872b53b8191e8a0
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "config-hash"
5
- s.version = "0.8.0"
5
+ s.version = "0.9.0"
6
6
  s.author = "Steve Shreeve"
7
7
  s.email = "steve.shreeve@gmail.com"
8
8
  s.summary = "A safe, homoiconic, Ruby hash supporting dot notation"
@@ -3,6 +3,12 @@ class Hash
3
3
  def +@; ConfigHash[self]; end
4
4
  end
5
5
 
6
+ class Array
7
+ def keys
8
+ +Hash[zip]
9
+ end
10
+ end
11
+
6
12
  class NormalHash < Hash
7
13
  end
8
14
 
@@ -41,6 +47,10 @@ class ConfigHash < Hash
41
47
  self
42
48
  end
43
49
 
50
+ def zip!(*args)
51
+ +Hash[keys.zip(*args)]
52
+ end
53
+
44
54
  def key?(key)
45
55
  super(key.to_s)
46
56
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config-hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Shreeve
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-30 00:00:00.000000000 Z
11
+ date: 2019-10-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem makes it easy to work with configuration data.
14
14
  email: steve.shreeve@gmail.com