funfig 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/funfig.rb +6 -4
  2. data/lib/funfig/version.rb +1 -1
  3. 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{|k, v|
56
- self.send("#{k}=", v)
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
@@ -1,3 +1,3 @@
1
1
  module Funfig
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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-03-30 00:00:00.000000000 Z
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.17
48
+ rubygems_version: 1.8.24
49
49
  signing_key:
50
50
  specification_version: 3
51
51
  summary: Configuration with calculable defaults