Created
December 16, 2013 20:35
-
-
Save ericdke/7993889 to your computer and use it in GitHub Desktop.
percentage method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Numeric | |
def percent_of(n) | |
self.to_f / n.to_f * 100.0 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment