Class: OpenWeather::Models::OneCall::HourlyWeather
- Defined in:
- lib/open_weather/models/one_call/hourly_weather.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
-
#initialize(args = nil, options = {}) ⇒ HourlyWeather
constructor
A new instance of HourlyWeather.
Methods inherited from Model
Constructor Details
#initialize(args = nil, options = {}) ⇒ HourlyWeather
Returns a new instance of HourlyWeather.
24 25 26 27 28 29 30 |
# File 'lib/open_weather/models/one_call/hourly_weather.rb', line 24 def initialize(args = nil, = {}) super args, self.rain = OpenWeather::Models::Rain.new(rain, ) if rain self.snow = OpenWeather::Models::Snow.new(snow, ) if snow self.weather = weather.map { |i| OpenWeather::Models::Weather.new(i, ) } if weather end |