Class: PropertySolutions::Phone
- Inherits:
-
Object
- Object
- PropertySolutions::Phone
- Defined in:
- app/models/property_solutions/phone.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#number ⇒ Object
Returns the value of attribute number.
Instance Method Summary collapse
-
#initialize(arr = nil) ⇒ Phone
constructor
A new instance of Phone.
- #parse(arr) ⇒ Object
Constructor Details
#initialize(arr = nil) ⇒ Phone
Returns a new instance of Phone.
7 8 9 10 11 12 |
# File 'app/models/property_solutions/phone.rb', line 7 def initialize(arr = nil) if (arr.nil?) @number = "" @description = "" end end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'app/models/property_solutions/phone.rb', line 5 def description @description end |
#number ⇒ Object
Returns the value of attribute number.
5 6 7 |
# File 'app/models/property_solutions/phone.rb', line 5 def number @number end |
Instance Method Details
#parse(arr) ⇒ Object
14 15 16 17 |
# File 'app/models/property_solutions/phone.rb', line 14 def parse(arr) @number = arr["PhoneNumber"] || "" @description = arr["PhoneDescription"] || "" end |