Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/buckybox/currency_data
Information about currencies
https://github.com/buckybox/currency_data
Last synced: about 1 month ago
JSON representation
Information about currencies
- Host: GitHub
- URL: https://github.com/buckybox/currency_data
- Owner: buckybox
- License: mit
- Created: 2013-08-30T00:02:10.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-07-21T21:00:13.000Z (over 10 years ago)
- Last Synced: 2024-03-27T11:25:48.725Z (10 months ago)
- Language: Ruby
- Size: 188 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# CurrencyData
Information about currencies.
This RubyGem comes with a JSON file containing information about all ISO currencies.
## Usage
```ruby
nzd = CurrencyData.find("NZD")
nzd.iso_code #=> "NZD"
nzd.name #=> "New Zealand Dollar"
nzd.symbol #=> "$"
nzd.alternate_symbols #=> ["NZ$"]
nzd.subunit #=> "Cent"
nzd.subunit_to_unit #=> 100
nzd.symbol_first #=> true
nzd.html_entity #=> "$"
nzd.decimal_mark #=> "."
nzd.thousands_separator #=> ","
nzd.iso_numeric #=> "554"
```## Kudos
Thanks to the Money Gem contributors for maintaining this [JSON file](https://github.com/RubyMoney/money/blob/master/config/currency_iso.json).