ultra_config 0.5.0 → 0.6.0

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: 9fa818185065c8251f2fb7b02815a5cf96691f74
4
- data.tar.gz: 0fb56fa72a0fff8e895e73dea0752ea141b40150
3
+ metadata.gz: 45e3cd0b3e5c162a02035c400998f8032e5f3870
4
+ data.tar.gz: ddc1e423404d068d18a42017eb35283048107ff1
5
5
  SHA512:
6
- metadata.gz: 0fbe008c5845958e36690b5f2357a4ab2ab6dae633319700426e7fee4a2d710c78c313757e57b4fcb426908cadd1bc35101ae734ced31973186426fad2ec6098
7
- data.tar.gz: a0601ed89d21d3bbca8d730b2908727309717ee2c48cf9bfef06270cf456ec28307e71070c54b9811bcde9a6e0b0ed7af7e39561e251bdd13f82431325fdd4c4
6
+ metadata.gz: 224b1be537616646332bc2647b088584fb88e55639a4c801e51c6bb6909ca1dd6b6b0c576868d6946c7c6e2b26377404fb680a161d0ad6cd5c567fa3294b92da
7
+ data.tar.gz: e7a5552fb37d6f859470f166f36029dba942fd54be780ecde2cfe4b86f97c2a2d5bf44390d94b7a7957a600310666a121a31c1ef70511b2f2537138b7a8d8ed3
@@ -7,6 +7,10 @@ module UltraConfig
7
7
  reset
8
8
  end
9
9
 
10
+ def setting(name, value)
11
+ Settings.set(name, value)
12
+ end
13
+
10
14
  def namespace(name, &block)
11
15
  @objects[name] = Namespace.new(&block)
12
16
  end
@@ -15,6 +19,10 @@ module UltraConfig
15
19
  @objects[name] = Config.new(default, &block)
16
20
  end
17
21
 
22
+ def helper(name, &block)
23
+ define_singleton_method(name, &block)
24
+ end
25
+
18
26
  def method_missing(m, *args)
19
27
  if m.to_s.end_with?('=')
20
28
  @objects[m.to_s[0...-1].to_sym].value=(args[0])
@@ -23,10 +31,6 @@ module UltraConfig
23
31
  end
24
32
  end
25
33
 
26
- def setting(name, value)
27
- Settings.set(name, value)
28
- end
29
-
30
34
  def reset
31
35
  @objects = {}
32
36
  self.instance_eval(&@configuration)
data/ultra_config.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'ultra_config'
7
- spec.version = '0.5.0'
7
+ spec.version = '0.6.0'
8
8
  spec.authors = ['Gregory Kuruc']
9
9
  spec.email = ['gjk910327@gmail.com']
10
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultra_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregory Kuruc
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-05 00:00:00.000000000 Z
11
+ date: 2018-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler