class NoaaWeatherClient::Services::CurrentObservations
Attributes
options[R]
Public Class Methods
new(options = {})
click to toggle source
# File lib/noaa_weather_client/services/current_observations.rb, line 9 def initialize(options = {}) @options = options end
Public Instance Methods
fetch(station, options = {})
click to toggle source
# 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
Private Instance Methods
response_class()
click to toggle source
# File lib/noaa_weather_client/services/current_observations.rb, line 27 def response_class options.fetch(:response_class, Responses::CurrentObservation) end
rest_service()
click to toggle source
# File lib/noaa_weather_client/services/current_observations.rb, line 23 def rest_service options.fetch(:rest_service, self) end