<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,7 @@
+== 2.0.2 released 2009-08-22
+
+* Define methods during method_missing instead of during initialization. Allows for modification on the fly.
+
 == 2.0.0 released 2009-08-22
 
 * Less magic, instead of automatically defining a Settings constant, you should define your own constant. See the readme for an example.</diff>
      <filename>CHANGELOG.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -3,8 +3,6 @@ require &quot;erb&quot;
 
 # A simple settings solution using a YAML file. See README for more information.
 class Settingslogic &lt; Hash
-  class UndefinedSetting &lt; StandardError; end
-  
   class &lt;&lt; self
     def name # :nodoc:
       instance.key?(&quot;name&quot;) ? instance.name : super
@@ -54,34 +52,16 @@ class Settingslogic &lt; Hash
       hash = hash[self.class.namespace] if self.class.namespace
       self.update hash
     end
-    
-    define_settings!
   end
   
   private
     def method_missing(name, *args, &amp;block)
-      raise UndefinedSetting.new(&quot;The '#{name}' was not found in your configuration file: #{self.class.source}&quot;)
-    end
-    
-    def define_settings!
-      self.each do |key, value|
-        case value
-        when Hash
-          instance_eval &lt;&lt;-&quot;end_eval&quot;, __FILE__, __LINE__
-            def #{key}
-              @#{key} ||= self.class.new(self[#{key.inspect}])
-            end
-          end_eval
-        else
-          instance_eval &lt;&lt;-&quot;end_eval&quot;, __FILE__, __LINE__
-            def #{key}
-              @#{key} ||= self[#{key.inspect}]
-            end
-            def #{key}=(value)
-              @#{key} = value
-            end
-          end_eval
-        end
+      if key?(name.to_s)
+        value = self[name.to_s].is_a?(Hash) ? self.class.new(self[name.to_s]) : self[name.to_s]
+        self.class.send(:define_method, name) { value }
+        send(name)
+      else
+        super
       end
     end
 end
\ No newline at end of file</diff>
      <filename>lib/settingslogic.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,10 +17,6 @@ describe &quot;Settingslogic&quot; do
     Settings.setting3.should == 25
   end
   
-  it &quot;should raise an error for unfound settings&quot; do
-    lambda { Settings.undefined }.should raise_error(Settingslogic::UndefinedSetting)
-  end
-  
   it &quot;should namespace settings&quot; do
     Settings2.setting1_child.should == &quot;saweet&quot;
   end</diff>
      <filename>spec/settingslogic_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>dbb2a95b1f23d1e4d392d419acb8da180d679658</id>
    </parent>
  </parents>
  <author>
    <name>binarylogic</name>
    <email>bjohnson@binarylogic.com</email>
  </author>
  <url>http://github.com/binarylogic/settingslogic/commit/606269dfc1209c1f60961816e863b16dd6267a12</url>
  <id>606269dfc1209c1f60961816e863b16dd6267a12</id>
  <committed-date>2009-08-22T01:02:59-07:00</committed-date>
  <authored-date>2009-08-22T01:02:59-07:00</authored-date>
  <message>* Define methods during method_missing instead of during initialization. Allows for modification on the fly.</message>
  <tree>c47afb249f054744dfe5936ded80f00cb86b0f9f</tree>
  <committer>
    <name>binarylogic</name>
    <email>bjohnson@binarylogic.com</email>
  </committer>
</commit>
