Class: PriceHubble::Valuation
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- PriceHubble::Valuation
- Defined in:
- lib/price_hubble/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
Methods included from Utils::Bangers
Methods included from Concern::Persistence
#destroyed?, #mark_as_destroyed, #new_record?, #persisted?
Methods included from Concern::Client
Methods included from Concern::Associations
has_many, has_one, inherited_setup_associations
Methods included from Concern::Attributes
#assign_attributes, #attributes, inherited_setup_attributes, tracked_attr, typed_attr
Methods included from Concern::Attributes::StringInquirer
Methods included from Concern::Attributes::Range
Methods included from Concern::Attributes::Enum
Methods included from Concern::Attributes::DateArray
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/price_hubble/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/price_hubble/entity/valuation.rb', line 42 def value_range return sale_price_range if deal_type.sale? rent_gross_range end |