aeonscope / number_to_fraction
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (2)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
CHANGELOG.rdoc | ||
| |
LICENSE.rdoc | ||
| |
README.rdoc | ||
| |
Rakefile | ||
| |
VERSION.yml | ||
| |
lib/ | ||
| |
number_to_fraction.gemspec | ||
| |
spec/ |
README.rdoc
Overview
A helper that can format a number into a fraction. Unfortunately, this only handles the "pretty printing" of fractions less than 1/10th at the moment (as a better algorithm needs to be used for more complex number cases).
License
Copyright © 2009 Brooke Kuhlmann of Berserk Technologies. See the included LICENSE for more info.
History
See the CHANGELOG file for more info.
Requirements
Installation
Type the following from the command line to install:
- UNIX: sudo gem install aeonscope-number_to_fraction
- Windows: gem install aeonscope-number_to_fraction
Update your environment.rb file to include the new gem:
- config.gem "aeonscope-number_to_fraction", :lib => "number_to_fraction", :source => "gems.github.com"
Usage
Example:
number_to_fraction 3.75
Result:
3 3/4
View the Rspec test suite for more usage and examples.

