class Integer
Public Instance Methods
as_percentage_of(n)
click to toggle source
# File lib/percentage.rb, line 146 def as_percentage_of(n) Percentage.new(Rational(self, n)) end
percent_of(n)
click to toggle source
# File lib/percentage.rb, line 142 def percent_of(n) n * Percentage(self) end
to_percentage()
click to toggle source
# File lib/percentage.rb, line 136 def to_percentage Percentage(self) end
Also aliased as: percent