RubyMoney/money — pull request #168 by kirillian (2012-05-07 21:34:45+00:00)
Title: Adding Precision Support

- Added support for precision when formatting strings
- Added support to create Money objects with a precision different than the currency's defined precision

- Caveats
- Formatting of precision currently uses truncation instead of rounding. I did not want to limit the possible rounding options and rounding is currently out of the scope of what I need for a current project.
- Use of precision when creating a money object actually defines a new currency based upon the original requested one. This creates an iso code (for the example of USD at 5 precision) of USD5 and an iso numeric of 8405. This is to prevent possible collisions in the iso code/numeric namespace. The new currency also uses a new ratio of subunit_to_unit to reflect the portions or multiple cents reflected by the cents value. The names of subunit is also modified to humanize this ratio.