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.
12 13 14 |
# File 'lib/noaa-weather.rb', line 12 def address @address end |
#geocoding ⇒ Object
Returns the value of attribute geocoding.
12 13 14 |
# File 'lib/noaa-weather.rb', line 12 def geocoding @geocoding end |
Instance Method Details
#cached? ⇒ Boolean
22 23 24 |
# File 'lib/noaa-weather.rb', line 22 def cached? @cached ||= false end |
#geocode ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/noaa-weather.rb', line 14 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 |