Class: CachedGeocode
- Inherits:
-
Object
- Object
- CachedGeocode
- Includes:
- GeoKit::Geocoders
- Defined in:
- lib/noaa-weather.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#geocoding ⇒ Object
Returns the value of attribute geocoding.
Instance Method Summary collapse
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
25 26 27 |
# File 'lib/noaa-weather.rb', line 25 def address @address end |
#geocoding ⇒ Object
Returns the value of attribute geocoding.
25 26 27 |
# File 'lib/noaa-weather.rb', line 25 def geocoding @geocoding end |
Instance Method Details
#cached? ⇒ Boolean
35 36 37 |
# File 'lib/noaa-weather.rb', line 35 def cached? @cached ||= false end |
#geocode ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/noaa-weather.rb', line 27 def geocode self.geocoding = gcode_cache_read {:lat => self.geocoding.lat, :lon => self.geocoding.lng, :site => self.geocoding.city.gsub(/[^a-zA-Z0-9]/,'_')} end |