class NoaaWeatherClient::Services::WeatherStations

Constants

URL

Attributes

options[R]

Public Class Methods

new(options = {}) click to toggle source
# File lib/noaa_weather_client/services/weather_stations.rb, line 11
def initialize(options = {})
  @options = options
end

Public Instance Methods

fetch(options = {}) click to toggle source
# 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

Private Instance Methods

response_class() click to toggle source
# File lib/noaa_weather_client/services/weather_stations.rb, line 27
def response_class
  options.fetch(:response_class, Responses::Stations)
end
rest_service() click to toggle source
# File lib/noaa_weather_client/services/weather_stations.rb, line 23
def rest_service
  options.fetch(:rest_service, self)
end