Class: PriceHubble::Valuation
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- PriceHubble::Valuation
- Defined in:
- lib/pricehubble/entity/valuation.rb
Overview
The PriceHubble valuation result for a given property.
Instance Attribute Summary
Attributes inherited from BaseEntity
Instance Method Summary collapse
-
#value ⇒ Integer?
A streamlined helper to get the value by the deal type.
-
#value_range ⇒ Range?
A streamlined helper to get the value range by the deal type.
Methods inherited from BaseEntity
Constructor Details
This class inherits a constructor from PriceHubble::BaseEntity
Instance Method Details
#value ⇒ Integer?
A streamlined helper to get the value by the deal type. (sale price if deal type is sale or gross rent value if deal type is rent)
32 33 34 35 36 |
# File 'lib/pricehubble/entity/valuation.rb', line 32 def value return sale_price if deal_type.sale? rent_gross end |
#value_range ⇒ Range?
A streamlined helper to get the value range by the deal type. (sale price range if deal type is sale or gross rent range if deal type is rent)
42 43 44 45 46 |
# File 'lib/pricehubble/entity/valuation.rb', line 42 def value_range return sale_price_range if deal_type.sale? rent_gross_range end |