Class: OpenWeather::Models::OneCall::DailyWeather

Inherits:
Model
  • Object
show all
Defined in:
lib/open_weather/models/one_call/daily_weather.rb

Instance Attribute Summary

Attributes inherited from Model

#options

Instance Method Summary collapse

Methods inherited from Model

#units

Constructor Details

#initialize(args = nil, options = {}) ⇒ DailyWeather

Returns a new instance of DailyWeather.



25
26
27
28
29
30
31
# File 'lib/open_weather/models/one_call/daily_weather.rb', line 25

def initialize(args = nil, options = {})
  super args, options

  self.temp = OpenWeather::Models::OneCall::Temp.new(temp, options) if temp
  self.feels_like = OpenWeather::Models::OneCall::FeelsLike.new(feels_like, options) if feels_like
  self.weather = weather.map { |i| OpenWeather::Models::Weather.new(i, options) } if weather
end