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 EntityConcern::Persistence
#destroyed?, #mark_as_destroyed, #new_record?, #persisted?
Methods included from EntityConcern::Client
Methods included from EntityConcern::Associations
has_many, has_one, inherited_setup_associations
Methods included from EntityConcern::Attributes
#assign_attributes, #attributes, inherited_setup_attributes, tracked_attr, typed_attr
Methods included from EntityConcern::Attributes::StringInquirer
Methods included from EntityConcern::Attributes::Range
Methods included from EntityConcern::Attributes::Enum
Methods included from EntityConcern::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 |