Class: Geokit::GeoLoc

Inherits:
Object
  • Object
show all
Defined in:
lib/geokit/geocoders/yandex_geocoder.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Object) kind

Returns the value of attribute kind



33
34
35
# File 'lib/geokit/geocoders/yandex_geocoder.rb', line 33

def kind
  @kind
end

- (Object) street_name

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

- (Object) street_number

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

- (Object) city=(city)

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

- (Object) street_address=(address)

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