config-hash 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config-hash.gemspec +1 -1
- data/lib/config-hash.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d402199a83e315a08c1ec966be61cacd3c611ad159266a9e5302694fe431f986
|
4
|
+
data.tar.gz: 8456cec67ff0dc3b0a7700dbb7d0765334068c8392a836aff9c6d0a3f626e92f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46202cd059c38067fed89a376c5db4dedf8a03329df78cfcfabfec930f80bbd810771fdbec14280ff868c932b6b589c9be11065f7ee4503fcb8276ecf109579c
|
7
|
+
data.tar.gz: f77bf4bd20d790219cee22b6beb84ef72b4f649c3a5afe2abf9eac20a24696b5aa96188bfa98ff9347535c3789453f8e8e07fc0b8c16782f4872b53b8191e8a0
|
data/config-hash.gemspec
CHANGED
data/lib/config-hash.rb
CHANGED
@@ -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.
|
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-
|
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
|