Skip to content

smt/fractions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Rails plugin that adds simple fraction support to instances of Float.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages