Sha256: 299e8be779fd841893991c59c7527fe36554b266aa32e241eddda8e5ec688e0d
Contents?: true
Size: 759 Bytes
Versions: 1
Compression:
Stored size: 759 Bytes
Contents
module Weather class Forecast # the brief name of the day associated with the forecast attr_reader :day # the date associated with the forecast. attr_reader :date # the low temperature forecasted. attr_reader :low # the high temperature forecasted. attr_reader :high # the brief prose text description of the forecasted weather conditions. attr_reader :text # the weather condition code, detailed at http://developer.yahoo.com/weather attr_reader :code def initialize(payload) @day = payload[:day] @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 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
weather-api-1.2.0 | lib/weather-api/forecast.rb |