proxinacci
Proxinacci is a simple gem that adds the closest_fibonacci method to the Fixnum class. closest_fibonacci will return the largest integer value from the fibonacci sequence smaller than the integer on which it is called.
Usage
30.closest_fibonacci # => 21
304.closest_fibonacci # => 233
233.closest_fibonacci # => 144
1.closest_fibonacci # => 0
0.closest_fibonacci # => nil
Copyright
Copyright © 2012 Matthew Werner. See LICENSE.txt for further details.