Module: Reality::Extras::OpenWeatherMap::CoordWeather

Defined in:
lib/reality/extras/open_weather_map.rb

Instance Method Summary collapse

Instance Method Details

#weatherObject



42
43
44
45
46
47
# File 'lib/reality/extras/open_weather_map.rb', line 42

def weather
  res = OpenWeather::Current.geocode(lat.to_f, lng.to_f,
                units: 'metric', APPID: appid) 

  Weather.from_hash(res)
end