Weather in Poland is a simple extension for yahoo-weather gem.
Dependencies:
- yahoo-weather
- mechanize
Instalation:
gem install weather-in-polandUsage:
#initialize
w = WeatherInPoland.new#this method return two things:
w.find_city(‘Pomorskie, Gdynia’)#name of city
w.city #in ex. Gdynia#code for this city
w.code #in ex. 493421#now we can use that code to get weather information
weather = w.get_weather(w.code)#and images
w.get_image(weather)#No we have access to 2 images:
- normal w.image
- thumb w.thumb
#Other weather info that same as in yahoo-weather:
pp weather #to see all