Class: Geocoder::Result::Bing
- Inherits:
-
Base
- Object
- Base
- Geocoder::Result::Bing
show all
- Defined in:
- lib/geocoder/results/bing.rb
Instance Attribute Summary
Attributes inherited from Base
#cache_hit, #data
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #latitude, #longitude, #province, #province_code
Class Method Details
.response_attributes ⇒ Object
38
39
40
|
# File 'lib/geocoder/results/bing.rb', line 38
def self.response_attributes
%w[bbox name confidence entityType]
end
|
Instance Method Details
#address(format = :full) ⇒ Object
6
7
8
|
# File 'lib/geocoder/results/bing.rb', line 6
def address(format = :full)
@data['address']['formattedAddress']
end
|
#address_data ⇒ Object
34
35
36
|
# File 'lib/geocoder/results/bing.rb', line 34
def address_data
@data['address']
end
|
#city ⇒ Object
10
11
12
|
# File 'lib/geocoder/results/bing.rb', line 10
def city
@data['address']['locality']
end
|
#coordinates ⇒ Object
30
31
32
|
# File 'lib/geocoder/results/bing.rb', line 30
def coordinates
@data['point']['coordinates']
end
|
#country ⇒ Object
Also known as:
country_code
20
21
22
|
# File 'lib/geocoder/results/bing.rb', line 20
def country
@data['address']['countryRegion']
end
|
#postal_code ⇒ Object
26
27
28
|
# File 'lib/geocoder/results/bing.rb', line 26
def postal_code
@data['address']['postalCode']
end
|
#state_code ⇒ Object
Also known as:
state
14
15
16
|
# File 'lib/geocoder/results/bing.rb', line 14
def state_code
@data['address']['adminDistrict']
end
|