Class: CivicInformation::RepresentativesResource::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/civic_information/models/representatives_resource/address.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cityObject

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_oneObject

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_threeObject

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_twoObject

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_nameObject

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

#stateObject

Returns the value of attribute state.



3
4
5
# File 'lib/civic_information/models/representatives_resource/address.rb', line 3

def state
  @state
end

#zipObject

Returns the value of attribute zip.



3
4
5
# File 'lib/civic_information/models/representatives_resource/address.rb', line 3

def zip
  @zip
end