Sha256: 0f89425c4db33f01029d9d27aca71a6fc08eea6500e80e69a705387dc574db04
Contents?: true
Size: 560 Bytes
Versions: 1
Compression:
Stored size: 560 Bytes
Contents
module RealEstateFinance class GrossOperatingIncome attr_reader :monthly_income, :estimated_loss_percentage def initialize(monthly_income, estimated_loss_percentage) @monthly_income = monthly_income @estimated_loss_percentage = estimated_loss_percentage end def gross_operating_income agi = sprintf("%0.02f", (@monthly_income * 12)).to_f loss_percentage = sprintf("%0.02f", @estimated_loss_percentage.to_i / (100.to_f)).to_f estimated_loss = sprintf("%0.02f", (agi * loss_percentage)).to_f 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/gross_operating_income.rb |