<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -29,7 +29,7 @@ h2. Usage
   
   # The CashHandler::Cache has a default cache life of one day, this can be overridden in one of two ways
   # Upon creation
-  c = CashHandler::Base.new(30.minutes)
+  c = CashHandler::Base.new(:ttl =&gt; 30.minutes)
   
   # During operation
   c.cache.ttl = 30.minutes
@@ -41,7 +41,7 @@ You may configure cash_handler to create a backup file every time it pulls rates
 
 &lt;pre&gt;&lt;code&gt;
   # Configure cash_handler to persist rates to our app's log directory
-  c = CashHandler::Base.new(1.day, &quot;#{RAILS_ROOT}/log/rates_backup.yml&quot;)
+  c = CashHandler::Base.new(:backup_rates_file_location =&gt; &quot;#{RAILS_ROOT}/tmp/rates.yml&quot;)
 &lt;/code&gt;&lt;/pre&gt;
 
 h2. Copyright and License</diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -3,8 +3,13 @@ module CashHandler
     attr_accessor :cache, :backup_rates_file_location
     
     # Init the CashHandler (and cache), with a default TTL of 1 day
-    def initialize(ttl=1.day, backup_rates_file_location = nil)
-      @cache = CashHandler::Cache.new(ttl, backup_rates_file_location)
+    def initialize(options={})
+      options = {
+        :ttl =&gt; 1.day,
+        :backup_rates_file_location =&gt; &quot;#{RAILS_ROOT}/tmp/rates.yml&quot;
+      }.merge(options)
+
+      @cache = CashHandler::Cache.new(options)
     end
     
     # Fetches the exchange rate of a currency against the USD</diff>
      <filename>lib/cash_handler/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,10 +5,10 @@ module CashHandler
     attr_accessor :ttl
     
     # Creates the cache with a default TTL (time to live) of 1 day. After this TTL has elapsed, cached values are refreshed
-    def initialize(ttl, backup_rates_file_location)
-      @ttl = ttl
-      @backup_rates_file_location = backup_rates_file_location
-      @expires_at = ttl.from_now
+    def initialize(options)
+      @ttl = options[:ttl]
+      @backup_rates_file_location = options[:backup_rates_file_location]
+      @expires_at = @ttl.from_now
       
       expire
     end</diff>
      <filename>lib/cash_handler/cache.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e45bdfe5b29ea368cdce76aee9db92b244c6f7b8</id>
    </parent>
  </parents>
  <author>
    <name>James Brooks</name>
    <email>james@gooddogdesign.com</email>
  </author>
  <url>http://github.com/JamesBrooks/cash_handler/commit/634232b4c3eaa7a9cf63b11145c11c86e9b5402d</url>
  <id>634232b4c3eaa7a9cf63b11145c11c86e9b5402d</id>
  <committed-date>2009-10-20T16:06:19-07:00</committed-date>
  <authored-date>2009-10-20T16:06:19-07:00</authored-date>
  <message>init now takes hash of options, rates backup file now has a default location if not specified</message>
  <tree>54c958d63457a1e84ba4e162abf8167acc389fac</tree>
  <committer>
    <name>James Brooks</name>
    <email>james@gooddogdesign.com</email>
  </committer>
</commit>
