Class: OpenWeather::Models::List
- Includes:
- Enumerable
- Defined in:
- lib/open_weather/models/list.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(args = nil, options = {}) ⇒ List
constructor
A new instance of List.
Methods inherited from Model
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, = {}) super args, self.list = list.map { |i| OpenWeather::Models::City::Weather.new(i, ) } 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 |