Class: NoaaWeatherClient::Responses::Stations
- Inherits:
-
Object
- Object
- NoaaWeatherClient::Responses::Stations
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/noaa_weather_client/responses/stations.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(response, options = {}) ⇒ Stations
constructor
A new instance of Stations.
- #to_xml ⇒ Object
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, = {}) @body = XmlParserFactory.build_parser.parse response @options = end |
Instance Method Details
#each ⇒ Object
18 19 20 |
# File 'lib/noaa_weather_client/responses/stations.rb', line 18 def each stations.each { |s| yield s } end |
#to_xml ⇒ Object
22 23 24 |
# File 'lib/noaa_weather_client/responses/stations.rb', line 22 def to_xml body.to_xml end |