class RealEstateFinance::EstimatedPropertyValueFromGRM

Attributes

market_value[R]
monthly_income[R]

Public Class Methods

new(market_value, monthly_income) click to toggle source
# File lib/real_estate_finance/estimated_property_value_from_grm.rb, line 6
def initialize(market_value, monthly_income)
  @market_value = market_value
  @monthly_income = monthly_income
end

Public Instance Methods

estimated_property_value_from_grm() click to toggle source
# File lib/real_estate_finance/estimated_property_value_from_grm.rb, line 11
def estimated_property_value_from_grm
  annual_gross_potential_income = sprintf("%0.02f", (@monthly_income * 12)).to_f
  calculation = @market_value.to_i / (annual_gross_potential_income)
  grm = sprintf("%0.03f", calculation).to_f
  property_value_by_grm = sprintf("%0.02f", (grm * annual_gross_potential_income)).to_f
end