Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smt/fractions
A Rails plugin that adds simple fraction support to instances of Float.
https://github.com/smt/fractions
Last synced: about 2 months ago
JSON representation
A Rails plugin that adds simple fraction support to instances of Float.
- Host: GitHub
- URL: https://github.com/smt/fractions
- Owner: smt
- Created: 2008-10-17T16:10:07.000Z (about 16 years ago)
- Default Branch: master
- Last Pushed: 2008-10-22T17:43:42.000Z (about 16 years ago)
- Last Synced: 2024-04-14T04:02:38.467Z (9 months ago)
- Language: Ruby
- Homepage:
- Size: 74.2 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
fractions
=========Adds a 'to_fraction' method to Float, e.g., (0.5).to_fraction => [1,2].
Originally a snippet by Michelle/shell (http://snippets.dzone.com/posts/show/3636), now ported to a Rails plugin.
I've also prepared a simple helper module that mixes a 'nice_fraction' method into ActionView::Base.
Copyright (c) 2008 Stephen Tudor, released under the MIT license