Class: OpenWeather::Models::List

Inherits:
Model
  • Object
show all
Includes:
Enumerable
Defined in:
lib/open_weather/models/list.rb

Instance Attribute Summary

Attributes inherited from Model

#options

Instance Method Summary collapse

Methods inherited from Model

#units

Constructor Details

#initialize(args = nil, options = {}) ⇒ List

Returns a new instance of List.



14
15
16
17
18
# File 'lib/open_weather/models/list.rb', line 14

def initialize(args = nil, options = {})
  super args, options

  self.list = list.map { |i| OpenWeather::Models::City::Weather.new(i, options) } if list
end

Instance Method Details

#each(&block) ⇒ Object



20
21
22
# File 'lib/open_weather/models/list.rb', line 20

def each(&block)
  list.each(&block)
end