Sha256: e10fb844fd823b5348a97dbf662fc08492c2fe2dcb4a9faf9806814ea7416b72
Contents?: true
Size: 1.51 KB
Versions: 6
Compression:
Stored size: 1.51 KB
Contents
# Monetize [](http://badge.fury.io/rb/monetize) [](https://travis-ci.org/RubyMoney/monetize) [](https://codeclimate.com/github/RubyMoney/monetize) [](https://coveralls.io/r/RubyMoney/monetize) [](https://gemnasium.com/RubyMoney/monetize) [](http://opensource.org/licenses/MIT) A library for converting various objects into `Money` objects. ## Installation Add this line to your application's Gemfile: gem 'monetize' And then execute: $ bundle Or install it yourself as: $ gem install monetize ## Usage ```ruby Monetize.parse("$100") == Money.new(100_00, "USD") Monetize.parse("€100") == Money.new(100_00, "EUR") Monetize.parse("£100") == Money.new(100_00, "GBP") "100".to_money == Money.new(100_00, "USD") ``` Optionally, enable the ability to assume the currency from a passed symbol. ```ruby Monetize.assume_from_symbol = true "$100".to_money == Money.new(100_00, "USD") ``` ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
monetize-1.1.0 | README.md |
monetize-1.0.0 | README.md |
monetize-0.4.1 | README.md |
monetize-0.4.0 | README.md |
monetize-0.3.0 | README.md |
monetize-0.2.0 | README.md |