<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1 +1,2 @@
 *.gem
+doc</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -9,8 +9,20 @@ This library aids one in handling money and different currencies. Features:
 - Provides APIs for exchanging money from one currency to another.
 - Has the ability to parse a money string into a Money object.
 
+Resources:
+
+- Website: http://money.rubyforge.org
+- RDoc API: http://money.rubyforge.org
+- Git repository: http://github.com/FooBarWidget/money/tree/master
+
 == Download
 
+Install stable releases with the following command:
+
+  gem install money
+
+The development version (hosted on Github) can be installed with:
+
   gem sources -a http://gems.github.com
   gem install FooBarWidget-money
 
@@ -18,6 +30,8 @@ This library aids one in handling money and different currencies. Features:
 
 === Synopsis
 
+  require 'money'
+  
   # 10.00 USD
   money = Money.new(1000, &quot;USD&quot;)
   money.cents     # =&gt; 1000
@@ -79,5 +93,5 @@ By default Money defaults to USD as its currency. This can be overwritten using
 
   Money.default_currency = &quot;CAD&quot;
 
-If you use Rails, the environment.rb is a very good place to put this. 
+If you use Rails, then environment.rb is a very good place to put this. 
 </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,15 @@ task :gem do
 	sh &quot;gem build money.gemspec&quot;
 end
 
+task &quot;Generate RDoc documentation&quot;
+task :rdoc do
+	sh &quot;hanna README.rdoc lib -U&quot;
+end
+
+task :upload =&gt; :rdoc do
+	sh &quot;scp -r doc/* rubyforge.org:/var/www/gforge-projects/money/&quot;
+end
+
 desc &quot;Run unit tests&quot;
 task :test do
 	sh &quot;spec -f s -c test/*_spec.rb&quot;</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,23 +1,23 @@
-# Converts this numeric to a Money object in the default currency. It
-# multiplies the numeric value by 100 and treats that as cents.
-#
-#   100.to_money =&gt; #&lt;Money @cents=10000&gt;
-#   100.37.to_money =&gt; #&lt;Money @cents=10037&gt;
 class Numeric
+  # Converts this numeric to a Money object in the default currency. It
+  # multiplies the numeric value by 100 and treats that as cents.
+  #
+  #   100.to_money =&gt; #&lt;Money @cents=10000&gt;
+  #   100.37.to_money =&gt; #&lt;Money @cents=10037&gt;
   def to_money
     Money.new(self * 100)
   end
 end
 
-# Parses the current string and converts it to a Money object.
-# Excess characters will be discarded.
-#
-#   '100'.to_money       # =&gt; #&lt;Money @cents=10000&gt;
-#   '100.37'.to_money    # =&gt; #&lt;Money @cents=10037&gt;
-#   '100 USD'.to_money   # =&gt; #&lt;Money @cents=10000, @currency=&quot;USD&quot;&gt;
-#   'USD 100'.to_money   # =&gt; #&lt;Money @cents=10000, @currency=&quot;USD&quot;&gt;
-#   '$100 USD'.to_money   # =&gt; #&lt;Money @cents=10000, @currency=&quot;USD&quot;&gt;
 class String
+  # Parses the current string and converts it to a Money object.
+  # Excess characters will be discarded.
+  #
+  #   '100'.to_money       # =&gt; #&lt;Money @cents=10000&gt;
+  #   '100.37'.to_money    # =&gt; #&lt;Money @cents=10037&gt;
+  #   '100 USD'.to_money   # =&gt; #&lt;Money @cents=10000, @currency=&quot;USD&quot;&gt;
+  #   'USD 100'.to_money   # =&gt; #&lt;Money @cents=10000, @currency=&quot;USD&quot;&gt;
+  #   '$100 USD'.to_money   # =&gt; #&lt;Money @cents=10000, @currency=&quot;USD&quot;&gt;
   def to_money
     # Get the currency.
     matches = scan /([A-Z]{2,3})/ </diff>
      <filename>lib/money/core_extensions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,13 @@
 require 'thread'
 require 'money/errors'
 
-# Example useage:
+# Class for aiding in exchanging money between different currencies.
+# By default, the Money class uses an object of this class (accessible through
+# Money#bank) for performing currency exchanges.
+#
+# By default, VariableExchangeBank has no knowledge about conversion rates.
+# One must manually specify them with +add_rate+, after which one can perform
+# exchanges with +exchange+. For example:
 #
 #  bank = Money::VariableExchangeBank.new
 #  bank.add_rate(&quot;USD&quot;, &quot;CAD&quot;, 1.24515)
@@ -13,6 +19,9 @@ require 'money/errors'
 #  bank.exchange(100_00, &quot;USD&quot;, &quot;CAD&quot;)  # =&gt; 80
 class Money
   class VariableExchangeBank
+    # Returns the singleton instance of VariableExchangeBank.
+    #
+    # By default, &lt;tt&gt;Money.default_bank&lt;/tt&gt; returns the same object.
     def self.instance
       @@singleton
     end
@@ -22,22 +31,34 @@ class Money
       @mutex = Mutex.new
     end
     
+    # Registers a conversion rate. +from+ and +to+ are both currency names.
     def add_rate(from, to, rate)
       @mutex.synchronize do
         @rates[&quot;#{from}_TO_#{to}&quot;.upcase] = rate
       end
     end
     
+    # Gets the rate for exchanging the currency named +from+ to the currency
+    # named +to+. Returns nil if the rate is unknown.
     def get_rate(from, to)
       @mutex.synchronize do
         @rates[&quot;#{from}_TO_#{to}&quot;.upcase] 
       end
     end
     
+    # Given two currency names, checks whether they're both the same currency.
+    #
+    #   bank = VariableExchangeBank.new
+    #   bank.same_currency?(&quot;usd&quot;, &quot;USD&quot;)   # =&gt; true
+    #   bank.same_currency?(&quot;usd&quot;, &quot;EUR&quot;)   # =&gt; false
     def same_currency?(currency1, currency2)
       currency1.upcase == currency2.upcase
     end
     
+    # Exchange the given amount of cents in +from_currency+ to +to_currency+.
+    # Returns the amount of cents in +to_currency+ as an integer, rounded down.
+    #
+    # If the conversion rate is unknown, then Money::UnknownRate will be raised.
     def exchange(cents, from_currency, to_currency)
       rate = get_rate(from_currency, to_currency)
       if !rate</diff>
      <filename>lib/money/variable_exchange_bank.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,7 @@ Gem::Specification.new do |s|
   s.homepage = &quot;http://github.com/FooBarWidget/money/tree/master&quot;
   s.description = &quot;Money and currency exchange support library.&quot;
   s.has_rdoc = false
+  s.rubyforge_project = &quot;money&quot;
   s.authors = [&quot;Tobias Luetke&quot;, &quot;Hongli Lai&quot;]
   
   s.files = [</diff>
      <filename>money.gemspec</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ccf2496f7a154ec9341b0a82e48e8251d3b1bd31</id>
    </parent>
  </parents>
  <author>
    <name>Hongli Lai (Phusion)</name>
    <email>hongli@phusion.nl</email>
  </author>
  <url>http://github.com/FooBarWidget/money/commit/a1ad4a7ad5c64709134e35890a2467287fe1fdbf</url>
  <id>a1ad4a7ad5c64709134e35890a2467287fe1fdbf</id>
  <committed-date>2008-10-31T11:17:38-07:00</committed-date>
  <authored-date>2008-10-31T11:17:38-07:00</authored-date>
  <message>Update documentation and URLs.</message>
  <tree>268e8b93eff416435bdffe63592dd36feb6def86</tree>
  <committer>
    <name>Hongli Lai (Phusion)</name>
    <email>hongli@phusion.nl</email>
  </committer>
</commit>
