Class: NoaaWeatherClient::Services::WeatherStations

Inherits:
Object
  • Object
show all
Includes:
RestService
Defined in:
lib/noaa_weather_client/services/weather_stations.rb

Constant Summary collapse

URL =
'http://w1.weather.gov/xml/current_obs/index.xml'

Instance Method Summary collapse

Methods included from RestService

#build_request_for_action, #object_from_response

Constructor Details

#initialize(options = {}) ⇒ WeatherStations

Returns a new instance of WeatherStations.



11
12
13
# File 'lib/noaa_weather_client/services/weather_stations.rb', line 11

def initialize(options = {})
  @options = options
end

Instance Method Details

#fetch(options = {}) ⇒ Object



15
16
17
# File 'lib/noaa_weather_client/services/weather_stations.rb', line 15

def fetch(options = {})
  rest_service.object_from_response(:get, URL, response_class: response_class)
end