Class: WeatherByIp

Inherits:
Object
  • Object
show all
Extended by:
WeatherInfo
Defined in:
lib/weather_by_ip.rb

Constant Summary

Constants included from WeatherInfo

WeatherInfo::URL, WeatherInfo::VERSION

Class Method Summary collapse

Methods included from WeatherInfo

included

Class Method Details

.get_weather(ip, key = GeoIp.api_key) ⇒ Object



10
11
12
# File 'lib/weather_by_ip.rb', line 10

def get_weather ip, key = GeoIp.api_key
  Weather.new(Weather.get_results_by_ip(ip, :key => key, :weather => :zip_code))
end