Class: OpenWeather::Models::Forecast::Hourly
- Includes:
- Enumerable
- Defined in:
- lib/open_weather/models/forecast/hourly.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
-
#initialize(args = nil, options = {}) ⇒ Hourly
constructor
A new instance of Hourly.
Methods inherited from Model
Constructor Details
#initialize(args = nil, options = {}) ⇒ Hourly
Returns a new instance of Hourly.
16 17 18 19 20 21 |
# File 'lib/open_weather/models/forecast/hourly.rb', line 16 def initialize(args = nil, = {}) super args, self.list = list.map { |forecast| OpenWeather::Models::Forecast::Forecast.new(forecast, ) } if list self.city = OpenWeather::Models::Forecast::City.new(city, ) if city end |