funfig 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/funfig.rb +6 -4
- data/lib/funfig/version.rb +1 -1
- metadata +3 -3
data/lib/funfig.rb
CHANGED
@@ -52,9 +52,11 @@ module Funfig
|
|
52
52
|
|
53
53
|
# Update config by hash
|
54
54
|
def update(hash)
|
55
|
-
hash.each
|
56
|
-
|
57
|
-
|
55
|
+
if hash.respond_to?(:each)
|
56
|
+
hash.each{|k, v|
|
57
|
+
self.send("#{k}=", v)
|
58
|
+
}
|
59
|
+
end
|
58
60
|
end
|
59
61
|
|
60
62
|
# Iterate over parameter names
|
@@ -164,7 +166,7 @@ module Funfig
|
|
164
166
|
end
|
165
167
|
|
166
168
|
define_method("#{name}=") do |hash|
|
167
|
-
send(name).update(hash)
|
169
|
+
send(name).update(hash) if hash
|
168
170
|
end
|
169
171
|
|
170
172
|
define_method("#{name}_reset!") do
|
data/lib/funfig/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: funfig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Defines configuration schema with calculable defaults
|
15
15
|
email:
|
@@ -45,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
45
45
|
version: '0'
|
46
46
|
requirements: []
|
47
47
|
rubyforge_project: funfig
|
48
|
-
rubygems_version: 1.8.
|
48
|
+
rubygems_version: 1.8.24
|
49
49
|
signing_key:
|
50
50
|
specification_version: 3
|
51
51
|
summary: Configuration with calculable defaults
|