Class: OpenWeather::Models::OneCall::CurrentWeather
- Defined in:
- lib/open_weather/models/one_call/current_weather.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
-
#initialize(args = nil, options = {}) ⇒ CurrentWeather
constructor
A new instance of CurrentWeather.
Methods inherited from Model
Constructor Details
#initialize(args = nil, options = {}) ⇒ CurrentWeather
Returns a new instance of CurrentWeather.
25 26 27 28 29 30 31 |
# File 'lib/open_weather/models/one_call/current_weather.rb', line 25 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 |