asetus 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/asetus.gemspec +1 -1
- data/lib/asetus/configstruct.rb +4 -2
- 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: 2d5438a78e5262674d5dd9e4ff6231b449fbb6d5
|
4
|
+
data.tar.gz: e51efe5017abb6bb8518348a1008953eccd56d33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dad252a95fc29a187d11631d1a12da9acc862c6f92e520237c6ecd8fd104bd8ec20cb2b46f074ff1ca5420e53e7c0d7f36b9f0ac88e4e657796fbe4f5d59b422
|
7
|
+
data.tar.gz: 023670dc263299e2f461330201d3d8d72ccea592d97364dfc92d3de335ef759bd6d232dc695d98b9fc0a2d424779a3487b852aa5f41c3e936b35b4d837b8bafb
|
data/asetus.gemspec
CHANGED
data/lib/asetus/configstruct.rb
CHANGED
@@ -39,10 +39,12 @@ class Asetus
|
|
39
39
|
def method_missing name, *args, &block
|
40
40
|
name = name.to_s
|
41
41
|
arg = args.first
|
42
|
-
if
|
42
|
+
if name[-1..-1] == '?' # asetus.cfg.foo.bar?
|
43
|
+
@cfg.has_key? name[0..-2]
|
44
|
+
elsif name[-1..-1] == '=' # asetus.cfg.foo.bar = 'quux'
|
43
45
|
_asetus_set name[0..-2], arg
|
44
46
|
else
|
45
|
-
_asetus_get name, arg
|
47
|
+
_asetus_get name, arg # asetus.cfg.foo.bar
|
46
48
|
end
|
47
49
|
end
|
48
50
|
|