Class: CivicInformation::RepresentativesResource::Address
- Inherits:
-
Object
- Object
- CivicInformation::RepresentativesResource::Address
- Defined in:
- lib/civic_information/models/representatives_resource/address.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#line_one ⇒ Object
Returns the value of attribute line_one.
-
#line_three ⇒ Object
Returns the value of attribute line_three.
-
#line_two ⇒ Object
Returns the value of attribute line_two.
-
#location_name ⇒ Object
Returns the value of attribute location_name.
-
#state ⇒ Object
Returns the value of attribute state.
-
#zip ⇒ Object
Returns the value of attribute zip.
Instance Method Summary collapse
-
#initialize(address_json) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(address_json) ⇒ Address
Returns a new instance of Address.
6 7 8 9 10 11 12 13 14 |
# File 'lib/civic_information/models/representatives_resource/address.rb', line 6 def initialize(address_json) @location_name = address_json["locationName"] @line_one = address_json["line1"] @line_two = address_json["line2"] @line_three = address_json["line3"] @city = address_json["city"] @state = address_json["state"] @zip = address_json["zip"] end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
3 4 5 |
# File 'lib/civic_information/models/representatives_resource/address.rb', line 3 def city @city end |
#line_one ⇒ Object
Returns the value of attribute line_one.
3 4 5 |
# File 'lib/civic_information/models/representatives_resource/address.rb', line 3 def line_one @line_one end |
#line_three ⇒ Object
Returns the value of attribute line_three.
3 4 5 |
# File 'lib/civic_information/models/representatives_resource/address.rb', line 3 def line_three @line_three end |
#line_two ⇒ Object
Returns the value of attribute line_two.
3 4 5 |
# File 'lib/civic_information/models/representatives_resource/address.rb', line 3 def line_two @line_two end |
#location_name ⇒ Object
Returns the value of attribute location_name.
3 4 5 |
# File 'lib/civic_information/models/representatives_resource/address.rb', line 3 def location_name @location_name end |
#state ⇒ Object
Returns the value of attribute state.
3 4 5 |
# File 'lib/civic_information/models/representatives_resource/address.rb', line 3 def state @state end |
#zip ⇒ Object
Returns the value of attribute zip.
3 4 5 |
# File 'lib/civic_information/models/representatives_resource/address.rb', line 3 def zip @zip end |