rails/rails — pull request #10996 by mattdbridges (2013-06-18 17:58:51+00:00)
Title: Refactor and clean up number helpers

Reading through the source of the number helpers is a nightmare. There is very little that can be understood about the code aside from the documentation for each. This is intended to pull some of the hidden secrets of these helpers into their own classes.

* Refactored all helpers to delegate to a `NumberConverter` object.
* Extracted as much hidden knowledge as possible.
* Eliminated need to hide private module methods
* Eliminated as much shared/hidden duplication in the objects.

I don't think I am done as I still do not fully grasp a lot of the mathematical decisions being made, so help with naming would be much appreciated.