Sha256: af9d4aa36a3a677f42bd5c834cce11d25bb818d911cdab3c209a884080d852c8
Contents?: true
Size: 758 Bytes
Versions: 2
Compression:
Stored size: 758 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
weather-api-1.1.1 | lib/weather-api/forecast.rb |
weather-api-1.1.0 | lib/weather-api/forecast.rb |