Files
grecia/lib/numeric.rb
2017-07-05 11:55:52 +02:00

5 lines
69 B
Ruby

class Numeric
def percent_of(n)
(to_f / n * 100).to_i
end
end