thechrisoshow/fractional — pull request #4 by muff1nman (2013-05-12 22:53:38+00:00)
Title: Revamp api

First of all, I totally understand if you do not want to merge this, as I reorganized and added a lot to the code base. The API is completely different as well.

My reasons for doing this:
1. The class methods to_s and to_f were a bit unweidly
2. I wanted to fix the outstanding pull request of reversability
3. The internal @value for instances had a good chance of being inconsistent
4. There was some un-needed logic that was already implemented in the Rational class.
5. Other things I can't remember

To make all this work, the biggest change is to make most of the class methods instance methods and represent value internally as a Rational. After that change the next largest change is the algorithm to guess the exact fractional value for repeating decimals. This fixes a lot of issues and makes the Fractional class less like Float and more like an extended version of Rational. Besides that there was a lot of api changes. I felt this was necessary to make it more intuitive.

Again, I understand if you don't want this as its a big pull request but let me know what you think.