Module: WeatherInsight
- Defined in:
- lib/weather_insight.rb,
lib/weather_insight/version.rb
Constant Summary collapse
- VERSION =
"0.0.2"
Class Method Summary collapse
Class Method Details
.month_data(spot, month) ⇒ Object
15 16 17 18 |
# File 'lib/weather_insight.rb', line 15 def month_data spot, month url = UrlList.month_url spot, month get_data url end |
.year_data(spot, interval: 0.3) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/weather_insight.rb', line 20 def year_data spot, interval: 0.3 year_data = {} 1.upto(12) do |month| url = UrlList.month_url spot, month month_data = get_data url year_data[month] = month_data sleep(interval) end year_data # year_data[:month][:day] end |