Class: NoaaWeatherClient::Services::CurrentObservations

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

Instance Method Summary collapse

Methods included from RestService

#build_request_for_action, #object_from_response

Constructor Details

#initialize(options = {}) ⇒ CurrentObservations

Returns a new instance of CurrentObservations.



9
10
11
# File 'lib/noaa_weather_client/services/current_observations.rb', line 9

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

Instance Method Details

#fetch(station, options = {}) ⇒ Object



13
14
15
16
17
# File 'lib/noaa_weather_client/services/current_observations.rb', line 13

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