class Weather::Forecast

Attributes

code[R]

the weather condition code, detailed at developer.yahoo.com/weather

date[R]

the date associated with the forecast.

day[R]

the brief name of the day associated with the forecast

high[R]

the high temperature forecasted.

low[R]

the low temperature forecasted.

text[R]

the brief prose text description of the forecasted weather conditions.

Public Class Methods

new(payload) click to toggle source
# File lib/weather-api/forecast.rb, line 21
def initialize(payload)
  @day  = payload[:day].strip
  @date = Utils.parse_time payload[:date]
  @low  = payload[:low].to_i
  @high = payload[:high].to_i
  @text = payload[:text]
  @code = payload[:code].to_i
end