class Weathercom::DailyForecast
Attributes
metadata[R]
Public Class Methods
new(info, metadata)
click to toggle source
# File lib/weathercom/daily_forecast.rb, line 6 def initialize(info, metadata) @info = info.dup.freeze @metadata = metadata end
Public Instance Methods
day_forecast()
click to toggle source
# File lib/weathercom/daily_forecast.rb, line 30 def day_forecast @day_forecast ||= if @info.key?('day') DayPartForecast.new(@info['day']) else nil end end
night_forecast()
click to toggle source
# File lib/weathercom/daily_forecast.rb, line 38 def night_forecast @night_forecast ||= DayPartForecast.new(@info['night']) end