Class: Geokit::GeoLoc
- Inherits:
-
Object
- Object
- Geokit::GeoLoc
- Defined in:
- lib/geokit/geocoders/yandex_geocoder.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#street_name ⇒ Object
Returns the street name portion of the street address.
-
#street_number ⇒ Object
Extracts the street number from the street address if the street address has a value.
Instance Method Summary collapse
-
#city=(city) ⇒ Object
Do not use ugly Geokit::Inflector::titleize when set city’s name.
-
#street_address=(address) ⇒ Object
Do not use ugly Geokit::Inflector::titleize when set street address.
Instance Attribute Details
#kind ⇒ Object
Returns the value of attribute kind.
33 34 35 |
# File 'lib/geokit/geocoders/yandex_geocoder.rb', line 33 def kind @kind end |
#street_name ⇒ Object
Returns the street name portion of the street address.
43 44 45 |
# File 'lib/geokit/geocoders/yandex_geocoder.rb', line 43 def street_name @street_name ||= street_address && street_address[street_number.length, street_address.length].strip end |
#street_number ⇒ Object
Extracts the street number from the street address if the street address has a value.
38 39 40 |
# File 'lib/geokit/geocoders/yandex_geocoder.rb', line 38 def street_number @street_number ||= street_address && street_address[/(\d*)/] end |
Instance Method Details
#city=(city) ⇒ Object
Do not use ugly Geokit::Inflector::titleize when set city’s name
48 49 50 |
# File 'lib/geokit/geocoders/yandex_geocoder.rb', line 48 def city=(city) @city = city end |
#street_address=(address) ⇒ Object
Do not use ugly Geokit::Inflector::titleize when set street address
53 54 55 |
# File 'lib/geokit/geocoders/yandex_geocoder.rb', line 53 def street_address=(address) @street_address = address end |