Class: PropertySolutions::Phone

Inherits:
Object
  • Object
show all
Defined in:
app/models/property_solutions/phone.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'app/models/property_solutions/phone.rb', line 5

def description
  @description
end

#numberObject

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