Sha256: 28410029ba796509d16fc0301cae7129449d44325a394636a14d7ff0a8823141
Contents?: true
Size: 1.34 KB
Versions: 1
Compression:
Stored size: 1.34 KB
Contents
module RealEstateFinance class NetOperatingIncome attr_reader :monthly_income, :vacancies, :non_payments, :taxes, :mortgage_interest, :marketing, :advertising, :management, :legal, :accounting, :utilities, :repairs, :maintenance, :acquisition, :sale_costs def initialize(monthly_income, vacancies, non_payments, taxes, mortgage_interest, marketing, advertising, management, legal, accounting, utilities, repairs, maintenance, acquisition, sale_costs) @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 end def net_operating_income 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 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
real_estate_finance-0.1.0 | lib/real_estate_finance/net_operating_income.rb |