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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d5438a78e5262674d5dd9e4ff6231b449fbb6d5
4
- data.tar.gz: e51efe5017abb6bb8518348a1008953eccd56d33
3
+ metadata.gz: a35c4aaaa3dcbbb3cebc0d3739e0bbea12dbf516
4
+ data.tar.gz: df049bdce93f3d388e556e82af8bf16babfc2210
5
5
  SHA512:
6
- metadata.gz: dad252a95fc29a187d11631d1a12da9acc862c6f92e520237c6ecd8fd104bd8ec20cb2b46f074ff1ca5420e53e7c0d7f36b9f0ac88e4e657796fbe4f5d59b422
7
- data.tar.gz: 023670dc263299e2f461330201d3d8d72ccea592d97364dfc92d3de335ef759bd6d232dc695d98b9fc0a2d424779a3487b852aa5f41c3e936b35b4d837b8bafb
6
+ metadata.gz: 6826d9593bc2fd0475b476ff2324840641859afab3340c2623e8a5119b96b86bf21173ef222b2a26d5b39735c9eac77a2022e28e5dced6623ce97223a2d539a5
7
+ data.tar.gz: 9aa66d652a42552230d5f8dd0d0ff076257943e2d17f7d0409f5f02263491b246b328bae0929fb4840b123e4cb6b8e9e814eb76ca792be78e11db78d381896c4
data/asetus.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'asetus'
3
- s.version = '0.0.5'
3
+ s.version = '0.0.6'
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.authors = [ 'Saku Ytti' ]
6
6
  s.email = %w( saku@ytti.fi )
@@ -21,7 +21,7 @@ class Asetus
21
21
  @cfg.each(&block)
22
22
  end
23
23
 
24
- def key? key
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asetus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saku Ytti