Class: NoaaWeatherClient::Services::PostalCodeToCoordinate
- Inherits:
-
Object
- Object
- NoaaWeatherClient::Services::PostalCodeToCoordinate
- Includes:
- RestService
- Defined in:
- lib/noaa_weather_client/services/postal_code_to_coordinate.rb
Constant Summary collapse
- URL =
"http://graphical.weather.gov/xml/sample_products/browser_interface/ndfdXMLclient.php?listZipCodeList="
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ PostalCodeToCoordinate
constructor
A new instance of PostalCodeToCoordinate.
- #resolve(zip, options = {}) ⇒ Object
Methods included from RestService
#build_request_for_action, #object_from_response
Constructor Details
#initialize(options = {}) ⇒ PostalCodeToCoordinate
Returns a new instance of PostalCodeToCoordinate.
11 12 13 |
# File 'lib/noaa_weather_client/services/postal_code_to_coordinate.rb', line 11 def initialize( = {}) @options = end |
Instance Method Details
#resolve(zip, options = {}) ⇒ Object
15 16 17 |
# File 'lib/noaa_weather_client/services/postal_code_to_coordinate.rb', line 15 def resolve(zip, = {}) rest_service.object_from_response(:get, build_url(zip), response_class: response_class) end |