Class: OpenWeather::Models::OneCall::DailyWeather
- Defined in:
- lib/open_weather/models/one_call/daily_weather.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
-
#initialize(args = nil, options = {}) ⇒ DailyWeather
constructor
A new instance of DailyWeather.
Methods inherited from Model
Constructor Details
#initialize(args = nil, options = {}) ⇒ DailyWeather
Returns a new instance of DailyWeather.
27 28 29 30 31 32 33 |
# File 'lib/open_weather/models/one_call/daily_weather.rb', line 27 def initialize(args = nil, = {}) super args, self.temp = OpenWeather::Models::OneCall::Temp.new(temp, ) if temp self.feels_like = OpenWeather::Models::OneCall::FeelsLike.new(feels_like, ) if feels_like self.weather = weather.map { |i| OpenWeather::Models::Weather.new(i, ) } if weather end |