Sha256: 6a12cc052e255000cf0c15dde1bc49caaddbbe75368544cadd40fb9e5ed6b3ed
Contents?: true
Size: 580 Bytes
Versions: 2
Compression:
Stored size: 580 Bytes
Contents
module Weather class Condition # the weather condition code, detailed at http://developer.yahoo.com/weather attr_reader :code # the date and time associated with these conditions. attr_reader :date # the temperature of the location. attr_reader :temp # the brief prose text description of the weather conditions of the location. attr_reader :text def initialize(payload) @code = payload[:code].to_i @date = Utils.parse_time payload[:date] @temp = payload[:temp].to_i @text = payload[:text].strip end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
weather-api-1.4.0 | lib/weather-api/condition.rb |
weather-api-1.3.0 | lib/weather-api/condition.rb |