Class: Geocoder::Result::Yandex
- Inherits:
-
Base
- Object
- Base
- Geocoder::Result::Yandex
show all
- Defined in:
- lib/geocoder/results/yandex.rb
Instance Attribute Summary
Attributes inherited from Base
#data
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #latitude, #longitude, #province, #province_code
Instance Method Details
#address(format = :full) ⇒ Object
10
11
12
|
# File 'lib/geocoder/results/yandex.rb', line 10
def address(format = :full)
@data['GeoObject']['metaDataProperty']['GeocoderMetaData']['text']
end
|
#city ⇒ Object
14
15
16
|
# File 'lib/geocoder/results/yandex.rb', line 14
def city
address_details['Locality']['LocalityName']
end
|
#coordinates ⇒ Object
6
7
8
|
# File 'lib/geocoder/results/yandex.rb', line 6
def coordinates
@data['GeoObject']['Point']['pos'].split(' ').reverse.map(&:to_f)
end
|
#country ⇒ Object
18
19
20
|
# File 'lib/geocoder/results/yandex.rb', line 18
def country
address_details['CountryName']
end
|
#country_code ⇒ Object
22
23
24
|
# File 'lib/geocoder/results/yandex.rb', line 22
def country_code
address_details['CountryNameCode']
end
|
#postal_code ⇒ Object
34
35
36
|
# File 'lib/geocoder/results/yandex.rb', line 34
def postal_code
""
end
|
#premise_name ⇒ Object
38
39
40
|
# File 'lib/geocoder/results/yandex.rb', line 38
def premise_name
address_details['Locality']['Premise']['PremiseName']
end
|
#state ⇒ Object
26
27
28
|
# File 'lib/geocoder/results/yandex.rb', line 26
def state
""
end
|
#state_code ⇒ Object
30
31
32
|
# File 'lib/geocoder/results/yandex.rb', line 30
def state_code
""
end
|