Sha256: a3998502a0316484d4cc7b84f58c62da8654759ce28d6bc97ef750d3ef56d80a
Contents?: true
Size: 629 Bytes
Versions: 3
Compression:
Stored size: 629 Bytes
Contents
module UndergroundWeather class DailyForecast attr_reader :day, :date, :high_f, :high_c, :low_f, :low_c, :conditions, :icon alias_method :high, :high_f alias_method :low, :low_f def initialize(forecast) @day = forecast['date']['weekday'] @date = Time.at(forecast['date']['epoch'].to_i) @high_f = forecast['high']['fahrenheit'] @high_c = forecast['high']['celsius'] @low_f = forecast['low']['fahrenheit'] @low_c = forecast['low']['celsius'] @conditions = forecast['conditions'] @icon = forecast['icon_url'] end end end
Version data entries
3 entries across 3 versions & 1 rubygems