Class: OpenWeather::Models::Forecast::Forecast
- Defined in:
- lib/open_weather/models/forecast/forecast.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
-
#initialize(args = nil, options = {}) ⇒ Forecast
constructor
A new instance of Forecast.
Methods inherited from Model
Constructor Details
#initialize(args = nil, options = {}) ⇒ Forecast
Returns a new instance of Forecast.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/open_weather/models/forecast/forecast.rb', line 19 def initialize(args = nil, = {}) super args, self.main = OpenWeather::Models::Main.new(main, ) if main self.weather = weather.map { |w| OpenWeather::Models::Weather.new(w, ) } if weather self.clouds = OpenWeather::Models::Clouds.new(clouds, ) if clouds self.wind = OpenWeather::Models::Wind.new(wind, ) if wind self.rain = OpenWeather::Models::Rain.new(rain, ) if rain self.snow = OpenWeather::Models::Snow.new(snow, ) if snow self.sys = OpenWeather::Models::Sys.new(sys, ) if sys end |