class Services::Domains::Weather::WeatherAtLocation
Aggregate root: weather at a location — groups a Geocode::Location, CurrentWeather, and the hourly/daily forecast entry arrays. Forecast arrays are wrapped with +Array()+ so +nil+ is safe.
Attributes
Public Class Methods
Source
# File app/services/domains/weather/weather_at_location.rb 12 def initialize( 13 location:, 14 current_weather:, 15 hourly_forecast_entries:, 16 daily_forecast_entries: 17 ) 18 @location = location 19 @current_weather = current_weather 20 @hourly_forecast_entries = Array(hourly_forecast_entries).freeze 21 @daily_forecast_entries = Array(daily_forecast_entries).freeze 22 freeze 23 end