class CompoundInterestCalculator
Public Instance Methods
amount_earned(principle, interest, compound, time)
click to toggle source
# File lib/compound_interest_calculator.rb, line 3 def amount_earned(principle, interest, compound, time) @result = (principle*(1 + (interest/100)/compound)**(compound*time)).round(2) end