lib/noaa/forecast_summary.rb
#
# The number of days provided by the forecast
#
The number of days provided by the forecast
The number of days provided by the forecast
def forecast_days
      @forecast_days ||= begin
        days = []
        length.times do |i|
          days << day = NOAA::ForecastDay.new
          day.starts_at = starts[i]
          day.ends_at = ends[i]
          day.high = maxima[i]
          day.low = minima[i]
          day.weather_summary = weather_summaries[i]
          day.weather_type_code = weather_type_codes[i]
          day.image_url = image_urls[i]
          day.daytime_precipitation_probability = precipitation_probabilities[i*2]
          day.evening_precipitation_probability = precipitation_probabilities[i*2+1]
        end
        days
      end
    end
def forecast_days @forecast_days ||= begin days = [ ] length . times do | i | days << day = NOAA :: ForecastDay . new day . starts_at = starts [ i ] day . ends_at = ends [ i ] day . high = maxima [ i ] day . low = minima [ i ] day . weather_summary = weather_summaries [ i ] day . weather_type_code = weather_type_codes [ i ] day . image_url = image_urls [ i ] day . daytime_precipitation_probability = precipitation_probabilities [ i * 2 ] day . evening_precipitation_probability = precipitation_probabilities [ i * 2 + 1 ] end days end end
The number of days provided by the forecast
The number of days provided by the forecast