class Object
Public Instance Methods
calculate_inflation(from_year, then_amount, to_year = 2019)
click to toggle source
# File lib/inflation_db.rb, line 390 def calculate_inflation(from_year, then_amount, to_year = 2019) amount_with_inflation = "%.2f" % (then_amount * @inflation_hash.fetch(to_year.to_s) / @inflation_hash.fetch(from_year.to_s)) amount_with_inflation end