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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 93b4b06e484007e5694fcf0a6f812f00cb4cbef0
4
- data.tar.gz: 33f3b1205a98c67ab7c1cd7815c22c8616ee318e
3
+ metadata.gz: 2d5438a78e5262674d5dd9e4ff6231b449fbb6d5
4
+ data.tar.gz: e51efe5017abb6bb8518348a1008953eccd56d33
5
5
  SHA512:
6
- metadata.gz: 51fcad0a5a96eca586fc80af0d36ba609cc50745cdfb75cdb8774984125869870156f841eafcb48618a7ce15b22c6ebe153872f8780b79cadaf8043f0013dd6f
7
- data.tar.gz: 2ded6f137ebbae0ba0589d1f0ef697fcf353345e7f723b13996bb52f0cffac4e63cf29155cfe24b4f7fada719da02203f9c1c45df67f2be6ab11d87f937399bd
6
+ metadata.gz: dad252a95fc29a187d11631d1a12da9acc862c6f92e520237c6ecd8fd104bd8ec20cb2b46f074ff1ca5420e53e7c0d7f36b9f0ac88e4e657796fbe4f5d59b422
7
+ data.tar.gz: 023670dc263299e2f461330201d3d8d72ccea592d97364dfc92d3de335ef759bd6d232dc695d98b9fc0a2d424779a3487b852aa5f41c3e936b35b4d837b8bafb
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.4'
3
+ s.version = '0.0.5'
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.authors = [ 'Saku Ytti' ]
6
6
  s.email = %w( saku@ytti.fi )
@@ -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 name[-1..-1] == '='
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
 
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.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saku Ytti