class Accuweather::Conditions::ForecastDay
Attributes
date[R]
day_of_week[R]
daytime[R]
nighttime[R]
sunrise[R]
sunset[R]
Public Class Methods
new(date:, day_of_week:, sunrise:, sunset:, daytime:, nighttime:)
click to toggle source
# File lib/accuweather/conditions/forecast_day.rb, line 6 def initialize(date:, day_of_week:, sunrise:, sunset:, daytime:, nighttime:) @date = date @day_of_week = day_of_week @sunrise = sunrise @sunset = sunset @daytime = daytime @nighttime = nighttime end
Public Instance Methods
==(other)
click to toggle source
# File lib/accuweather/conditions/forecast_day.rb, line 15 def ==(other) date == other.date && day_of_week == other.day_of_week && sunrise == other.sunrise && sunset == other.sunset && daytime == other.daytime && nighttime == other.nighttime rescue NoMethodError false end
to_s()
click to toggle source
# File lib/accuweather/conditions/forecast_day.rb, line 26 def to_s "date: #{date}, day_of_week: #{day_of_week}, sunrise: #{sunrise}, sunset: #{sunset}, daytime: #{daytime}, nighttime: #{nighttime}" end