lib/weather_hacker.rb
# return weather data on the received date
# if the date is not supported, return nil
return weather data on the received date
if the date is not supported, return nil
return weather data on the received date if the date is not supported return nil
def on(date)
    now = Date.today
    case date
    when now + 0; today
    when now + 1; tomorrow
    when now + 2; day_after_tomorrow
    end
  end
def on ( date ) now = Date . today case date when now + 0 ; today when now + 1 ; tomorrow when now + 2 ; day_after_tomorrow end end
return weather data on the received date
if the date is not supported, return nil
return weather data on the received date if the date is not supported return nil
date