asetus 0.0.5 → 0.0.6
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 +6 -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: a35c4aaaa3dcbbb3cebc0d3739e0bbea12dbf516
|
4
|
+
data.tar.gz: df049bdce93f3d388e556e82af8bf16babfc2210
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6826d9593bc2fd0475b476ff2324840641859afab3340c2623e8a5119b96b86bf21173ef222b2a26d5b39735c9eac77a2022e28e5dced6623ce97223a2d539a5
|
7
|
+
data.tar.gz: 9aa66d652a42552230d5f8dd0d0ff076257943e2d17f7d0409f5f02263491b246b328bae0929fb4840b123e4cb6b8e9e814eb76ca792be78e11db78d381896c4
|
data/asetus.gemspec
CHANGED
data/lib/asetus/configstruct.rb
CHANGED
@@ -21,7 +21,7 @@ class Asetus
|
|
21
21
|
@cfg.each(&block)
|
22
22
|
end
|
23
23
|
|
24
|
-
def
|
24
|
+
def has_key? key
|
25
25
|
@cfg.has_key? key
|
26
26
|
end
|
27
27
|
|
@@ -40,7 +40,11 @@ class Asetus
|
|
40
40
|
name = name.to_s
|
41
41
|
arg = args.first
|
42
42
|
if name[-1..-1] == '?' # asetus.cfg.foo.bar?
|
43
|
-
@cfg.has_key? name[0..-2]
|
43
|
+
if @cfg.has_key? name[0..-2]
|
44
|
+
@cfg[name[0..-2]] ? true : false
|
45
|
+
else
|
46
|
+
nil
|
47
|
+
end
|
44
48
|
elsif name[-1..-1] == '=' # asetus.cfg.foo.bar = 'quux'
|
45
49
|
_asetus_set name[0..-2], arg
|
46
50
|
else
|