Skip to content

Instantly share code, notes, and snippets.

@ShadowBelmolve
Created April 16, 2009 23:02
Show Gist options
  • Save ShadowBelmolve/96741 to your computer and use it in GitHub Desktop.
Save ShadowBelmolve/96741 to your computer and use it in GitHub Desktop.
>> a=Money.new(1000)
=> #<Money:0xb77d6114 @bank=#<Money::VariableExchangeBank:0xb77e383c @rates={"USD"=>1.0}, currency"USD", cents1000
>> Money.default_bank.fetch_rates; nil
=> nil
>> b=Money.new(1500)
=> #<Money:0xb77867b8 @bank=#<Money::VariableExchangeBank:0xb77e383c @rates={"ZAR"=>11.91, "EEK"=>15.6466, "IDR"=>14119.72, "HKD"=>10.2273, "HRK"=>7.3733, "CHF"=>1.5127, "PHP"=>62.81, "NZD"=>2.3137, "INR"=>65.66, "LVL"=>0.7095, "EUR"=>1.0, "THB"=>46.681, "MXN"=>17.1911, "CNY"=>9.0163, "SEK"=>10.934, "HUF"=>293.34, "LTL"=>3.4528, "DKK"=>7.4488, "SGD"=>1.9757, "KRW"=>1761.1, "AUD"=>1.8315, "TRY"=>2.1164, "MYR"=>4.7492, "CAD"=>1.5874, "BRL"=>2.8771, "RON"=>4.2128, "USD"=>1.3196, "PLN"=>4.291, "JPY"=>130.5, "RUB"=>44.047, "CZK"=>26.92, "BGN"=>1.9558, "NOK"=>8.837, "GBP"=>0.8856}, currency"USD", cents1500
>> a
=> #<Money:0xb77d6114 @bank=#<Money::VariableExchangeBank:0xb77e383c @rates={"ZAR"=>11.91, "EEK"=>15.6466, "IDR"=>14119.72, "HKD"=>10.2273, "HRK"=>7.3733, "CHF"=>1.5127, "PHP"=>62.81, "NZD"=>2.3137, "INR"=>65.66, "LVL"=>0.7095, "EUR"=>1.0, "THB"=>46.681, "MXN"=>17.1911, "CNY"=>9.0163, "SEK"=>10.934, "HUF"=>293.34, "LTL"=>3.4528, "DKK"=>7.4488, "SGD"=>1.9757, "KRW"=>1761.1, "AUD"=>1.8315, "TRY"=>2.1164, "MYR"=>4.7492, "CAD"=>1.5874, "BRL"=>2.8771, "RON"=>4.2128, "USD"=>1.3196, "PLN"=>4.291, "JPY"=>130.5, "RUB"=>44.047, "CZK"=>26.92, "BGN"=>1.9558, "NOK"=>8.837, "GBP"=>0.8856}, currency"USD", cents1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment