module Reality::Extras::OpenWeatherMap::CoordWeather

Public Instance Methods

weather() click to toggle source
# 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

Private Instance Methods

appid() click to toggle source
# File lib/reality/extras/open_weather_map.rb, line 51
def appid
  Reality.config.fetch('keys', 'open_weather_map')
end