Sha256: e0149c0c69cfe7dfe38535190e68f0fd26f9cd04e54432dffc1e6789f9c98907

Contents?: true

Size: 880 Bytes

Versions: 1

Compression:

Stored size: 880 Bytes

Contents

# XeCurrency

This gem extends Money::Bank::VariableExchange with Money::Bank::XeCurrency and
gives you access to the current rates from the XE currency converter.

Usage
-----

```ruby
require 'money'
require 'money/bank/xe_currency'

# (optional)
# set the seconds after than the current rates are automatically expired
# by default, they never expire
Money::Bank::XeCurrency.ttl_in_seconds = 86400

# set default bank to instance of XeCurrency
Money.default_bank = Money::Bank::XeCurrency.new

# create a new money object, and use the standard #exchange_to method
money = Money.new(1_00, "USD") # amount is in cents
money.exchange_to(:EUR)

# or install and use the 'monetize' gem
require 'monetize'
money = 1.to_money(:USD)
money.exchange_to(:EUR)
```

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xe_currency-0.0.1 README.md