staskie/currency_switcher — Issue #2: Exchange is an invalid method
Author: PeterHamilton
Created: 2011-10-09 13:09:39+00:00
State: open

Hi, this seems great but having trouble with the exchange function. See below for the output I get. I followed the instructions in the readme exactly.

```bash
Loading development environment (Rails 3.0.9)
ruby-1.9.2-p180 :001 > require 'currency_switcher'
=> nil
ruby-1.9.2-p180 :002 > # Convert 3 US Dollars to British Pounds
ruby-1.9.2-p180 :003 > 3.usd_to_gbp
=> 1.93
ruby-1.9.2-p180 :004 >
ruby-1.9.2-p180 :005 > # Convert 15 Euros to Australian Dollars
ruby-1.9.2-p180 :006 > 15.eur_to_aud
=> 20.52
ruby-1.9.2-p180 :007 > # Convert 3 US Dollars to British Pounds
ruby-1.9.2-p180 :008 > 3.exchange("usd", "gbp")
NoMethodError: undefined method `exchange' for 3:Fixnum
from /Users/peterhamilton/.rvm/gems/ruby-1.9.2-p180@rails3/gems/currency_switcher-0.0.1/lib/currency_switcher/ext/fixnum.rb:20:in `method_missing'
from (irb):8
from /Users/peterhamilton/.rvm/gems/ruby-1.9.2-p180@rails3/gems/railties-3.0.9/lib/rails/commands/console.rb:44:in `start'
from /Users/peterhamilton/.rvm/gems/ruby-1.9.2-p180@rails3/gems/railties-3.0.9/lib/rails/commands/console.rb:8:in `start'
from /Users/peterhamilton/.rvm/gems/ruby-1.9.2-p180@rails3/gems/railties-3.0.9/lib/rails/commands.rb:23:in `'
from script/rails:6:in `require'
from script/rails:6:in `

'
ruby-1.9.2-p180 :009 >
```