Class: Geocoder::Result::MelissaStreet
- Inherits:
-
Base
- Object
- Base
- Geocoder::Result::MelissaStreet
show all
- Defined in:
- lib/geocoder/results/melissa_street.rb
Instance Attribute Summary
Attributes inherited from Base
#cache_hit, #data
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #latitude, #longitude, #province, #province_code
Instance Method Details
#address(format = :full) ⇒ Object
5
6
7
|
# File 'lib/geocoder/results/melissa_street.rb', line 5
def address(format = :full)
@data['FormattedAddress']
end
|
#city ⇒ Object
21
22
23
|
# File 'lib/geocoder/results/melissa_street.rb', line 21
def city
@data['Locality']
end
|
#coordinates ⇒ Object
42
43
44
|
# File 'lib/geocoder/results/melissa_street.rb', line 42
def coordinates
[@data['Latitude'].to_f, @data['Longitude'].to_f]
end
|
#country ⇒ Object
30
31
32
|
# File 'lib/geocoder/results/melissa_street.rb', line 30
def country
@data['CountryName']
end
|
#country_code ⇒ Object
34
35
36
|
# File 'lib/geocoder/results/melissa_street.rb', line 34
def country_code
@data['CountryISO3166_1_Alpha2']
end
|
#number ⇒ Object
17
18
19
|
# File 'lib/geocoder/results/melissa_street.rb', line 17
def number
@data['PremisesNumber']
end
|
#postal_code ⇒ Object
38
39
40
|
# File 'lib/geocoder/results/melissa_street.rb', line 38
def postal_code
@data['PostalCode']
end
|
#state_code ⇒ Object
Also known as:
state
25
26
27
|
# File 'lib/geocoder/results/melissa_street.rb', line 25
def state_code
@data['AdministrativeArea']
end
|
#street_address ⇒ Object
9
10
11
|
# File 'lib/geocoder/results/melissa_street.rb', line 9
def street_address
@data['AddressLine1']
end
|
#suffix ⇒ Object
13
14
15
|
# File 'lib/geocoder/results/melissa_street.rb', line 13
def suffix
@data['ThoroughfareTrailingType']
end
|