Class: PropertySolutions::Property
- Inherits:
-
Object
- Object
- PropertySolutions::Property
- Defined in:
- app/models/property_solutions/property.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#disabled ⇒ Object
Returns the value of attribute disabled.
-
#id ⇒ Object
Returns the value of attribute id.
-
#long_desc ⇒ Object
Returns the value of attribute long_desc.
-
#name ⇒ Object
Returns the value of attribute name.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#short_desc ⇒ Object
Returns the value of attribute short_desc.
-
#type ⇒ Object
Returns the value of attribute type.
-
#website ⇒ Object
Returns the value of attribute website.
Instance Method Summary collapse
-
#initialize(arr) ⇒ Property
constructor
A new instance of Property.
- #parse(arr) ⇒ Object
Constructor Details
#initialize(arr) ⇒ Property
Returns a new instance of Property.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/models/property_solutions/property.rb', line 7 def initialize(arr) if (arr.nil?) @id = "" @name = "" @type = "" @short_desc = "" @long_desc = "" @website = "" @address = Address.new @phone = Phone.new @disabled = false else parse(arr) end end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
5 6 7 |
# File 'app/models/property_solutions/property.rb', line 5 def address @address end |
#disabled ⇒ Object
Returns the value of attribute disabled.
5 6 7 |
# File 'app/models/property_solutions/property.rb', line 5 def disabled @disabled end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'app/models/property_solutions/property.rb', line 5 def id @id end |
#long_desc ⇒ Object
Returns the value of attribute long_desc.
5 6 7 |
# File 'app/models/property_solutions/property.rb', line 5 def long_desc @long_desc end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'app/models/property_solutions/property.rb', line 5 def name @name end |
#phone ⇒ Object
Returns the value of attribute phone.
5 6 7 |
# File 'app/models/property_solutions/property.rb', line 5 def phone @phone end |
#short_desc ⇒ Object
Returns the value of attribute short_desc.
5 6 7 |
# File 'app/models/property_solutions/property.rb', line 5 def short_desc @short_desc end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'app/models/property_solutions/property.rb', line 5 def type @type end |
#website ⇒ Object
Returns the value of attribute website.
5 6 7 |
# File 'app/models/property_solutions/property.rb', line 5 def website @website end |
Instance Method Details
#parse(arr) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/models/property_solutions/property.rb', line 23 def parse(arr) @id = arr['PropertyID'] || "" @name = arr['MarketingName'] || "" @type = arr['Apartment'] || "" @short_desc = arr['ShortDescription'] || "" @long_desc = arr['LongDescription'] || "" @website = arr['webSite'] || "" @address = Address.new(arr['Address']) @phone = Phone.new(arr['Phone']) @disabled = arr['IsDisabled'] || "" end |