class RealEstateFinance::EstimatedPropertyValueFromCapRate
Attributes
accounting[R]
acquisition[R]
advertising[R]
legal[R]
maintenance[R]
management[R]
marketing[R]
monthly_income[R]
mortgage_interest[R]
non_payments[R]
repairs[R]
sale_costs[R]
sale_earned[R]
taxes[R]
utilities[R]
vacancies[R]
Public Class Methods
new(monthly_income, vacancies, non_payments, taxes, mortgage_interest, marketing, advertising, management, legal, accounting, utilities, repairs, maintenance, acquisition, sale_costs, sale_earned)
click to toggle source
# File lib/real_estate_finance/estimated_property_value_from_cap_rate.rb, line 6 def initialize(monthly_income, vacancies, non_payments, taxes, mortgage_interest, marketing, advertising, management, legal, accounting, utilities, repairs, maintenance, acquisition, sale_costs, sale_earned) @monthly_income = monthly_income @vacancies = vacancies @non_payments = non_payments @taxes = taxes @mortgage_interest = mortgage_interest @marketing = marketing @advertising = advertising @management = management @legal = legal @accounting = accounting @utilities = utilities @repairs = repairs @maintenance = maintenance @acquisition = acquisition @sale_costs = sale_costs @sale_earned = sale_earned end
Public Instance Methods
estimated_property_value_from_cap_rate()
click to toggle source
# File lib/real_estate_finance/estimated_property_value_from_cap_rate.rb, line 25 def estimated_property_value_from_cap_rate gpi = sprintf("%0.02f", (@monthly_income * 12)).to_f credit_losses = [@vacancies, @non_payments, @taxes, @mortgage_interest, @marketing, @advertising, @management, @legal, @accounting, @utilities, @repairs, @maintenance, @acquisition, @sale_costs] total_expenses = credit_losses.reduce(:+) expenses = sprintf("%0.02f", total_expenses).to_f noi = gpi - expenses cap_rate = sprintf("%0.03f", (noi/(@sale_earned))).to_f estimated_value = sprintf("%0.02f", (noi / (cap_rate))).to_f end