Sha256: 82b406e99d797eb0992dea5b62dc2883163077cf4a1712dfd5361bf572ec57c9

Contents?: true

Size: 603 Bytes

Versions: 1

Compression:

Stored size: 603 Bytes

Contents

module RealEstateFinance
  class EstimatedPropertyValueFromGRM

    attr_reader :market_value, :monthly_income

    def initialize(market_value, monthly_income)
      @market_value = market_value
      @monthly_income = monthly_income
    end

    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

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
real_estate_finance-0.1.0 lib/real_estate_finance/estimated_property_value_from_grm.rb