Method: Weather#forecast_data

Defined in:
lib/easy_weather/weather.rb

#forecast_dataObject



13
14
15
16
17
18
19
20
# File 'lib/easy_weather/weather.rb', line 13

def forecast_data
  forecast["list"].each_with_index do |day, index|
    puts "Day #{index + 1}\n"
    puts "Temperature: #{day["main"]["temp"]} centigrades\n"
    puts "Weather: #{day["weather"][0]["description"]}\n"
  end
  "Take your precautions for the  week!"
end