Class: NoaaWeatherClient::Responses::Stations

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/noaa_weather_client/responses/stations.rb

Instance Method Summary collapse

Constructor Details

#initialize(response, options = {}) ⇒ Stations

Returns a new instance of Stations.



13
14
15
16
# File 'lib/noaa_weather_client/responses/stations.rb', line 13

def initialize(response, options = {})
  @body = XmlParserFactory.build_parser.parse response
  @options = options
end

Instance Method Details

#eachObject



18
19
20
# File 'lib/noaa_weather_client/responses/stations.rb', line 18

def each
  stations.each { |s| yield s }
end

#to_xmlObject



22
23
24
# File 'lib/noaa_weather_client/responses/stations.rb', line 22

def to_xml
  body.to_xml
end