Class: Graticule::Geocoder::Geonames
- Defined in:
- lib/graticule/geocoder/geonames.rb
Defined Under Namespace
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
-
#initialize ⇒ Geonames
constructor
A new instance of Geonames.
- #time_zone(location) ⇒ Object
Constructor Details
#initialize ⇒ Geonames
Returns a new instance of Geonames.
6 7 8 |
# File 'lib/graticule/geocoder/geonames.rb', line 6 def initialize @url = URI.parse 'http://ws.geonames.org/timezone' end |
Instance Method Details
#time_zone(location) ⇒ Object
10 11 12 |
# File 'lib/graticule/geocoder/geonames.rb', line 10 def time_zone(location) get :formatted => 'true', :style => 'full', :lat => location.latitude, :lng => location.longitude end |