king_konf 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/king_konf/config.rb +6 -0
- data/lib/king_konf/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abc81cff30b2a3d480020c088f5134c054571f73
|
4
|
+
data.tar.gz: e076879bbfc0d94890fe661fdd2162df8ab21902
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df30bcc671ebd55378a87ca970a86df2cf8f702523092aaaea634902df34475bd1b375ff7abeb5670f5d80ea419650230d612b872bca631b65a402a4906d5546
|
7
|
+
data.tar.gz: 60706bc33e11bef6bb59238a55d651ec8d157d74c9d81603ec9bdc777ed3bd4e352bdf1c2167b95c069676a642e5ee6f14d20c2e664c3f88b939c96dfff7979b
|
data/lib/king_konf/config.rb
CHANGED
@@ -90,6 +90,12 @@ module KingKonf
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
+
def decode(name, value)
|
94
|
+
decoded_value = self.class.variable(name).decode(value)
|
95
|
+
|
96
|
+
set(name, decoded_value)
|
97
|
+
end
|
98
|
+
|
93
99
|
def set(name, value)
|
94
100
|
unless self.class.variable?(name)
|
95
101
|
raise ConfigError, "unknown configuration variable #{name}"
|
data/lib/king_konf/version.rb
CHANGED