class Weather::Condition
Attributes
code[R]
the weather condition code, detailed at developer.yahoo.com/weather
date[R]
the date and time associated with these conditions.
temp[R]
the temperature of the location.
text[R]
the brief prose text description of the weather conditions of the location.
Public Class Methods
new(payload)
click to toggle source
# File lib/weather-api/condition.rb, line 15 def initialize(payload) @code = payload[:code].to_i @date = Utils.parse_time payload[:date] @temp = payload[:temp].to_i @text = payload[:text].strip end