ultra_config 0.7.0 → 0.8.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: 295fbba3cf717f20c88cb9eb553f8be75db7ea84
4
- data.tar.gz: f7d2de63cdd2ff5b114773d14985a9b01edd9551
3
+ metadata.gz: ef3922624fb3376ac07f3aa68273ba3832cb3ff2
4
+ data.tar.gz: 4ff32e508b19c6d39795c11134752cccf6153165
5
5
  SHA512:
6
- metadata.gz: 7cf1f7b6b587b60ad941c5a5ae25f6092765274b4e87eac881d4f61183971eab2a254ff7c4be0d09255418a5def0b66e4bba1dd524c99ce06edeae72b8ce4b3f
7
- data.tar.gz: 3d1c9cc568c01a6de93622ecb3810d06bd12a57619645ec02b77fd9755c88e1884e2e432aeebae00d858336d8ae0f147f41dcdd894bde70f09a703cb0a71d1aa
6
+ metadata.gz: 452da79081a7f2b4e52c710857b575eb163c82720d4838455016786167a6918e345e72d22957223837a63ec485ead55054884d3960a2d05468731d3d858bedda
7
+ data.tar.gz: c9c92dfc65e7da7a61edc8d64257448fde2b408d1904bf6f59558a6943fb667ff9b468a0a28dcdd1f38cb27c4abdba9b428d326f5077f4fe7ac2bca1388f3f58
@@ -49,5 +49,18 @@ module UltraConfig
49
49
  output << objs.join(', ')
50
50
  output << ' }'
51
51
  end
52
+
53
+ def to_h
54
+ hash = {}
55
+ @objects.each do |name, object|
56
+ if object.is_a?(Config)
57
+ hash[name] = object.value
58
+ else
59
+ hash[name] = object.to_h
60
+ end
61
+ end
62
+
63
+ hash
64
+ end
52
65
  end
53
66
  end
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.7.0'
7
+ spec.version = '0.8.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.7.0
4
+ version: 0.8.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-08 00:00:00.000000000 Z
11
+ date: 2018-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler