Class: Barometer::WeatherService::Response::Location
- Inherits:
-
Object
- Object
- Barometer::WeatherService::Response::Location
- Defined in:
- lib/barometer/weather_services/response/location.rb
Direct Known Subclasses
WundergroundV1::Response::Location, WundergroundV1::Response::Station
Instance Method Summary collapse
-
#initialize(payload) ⇒ Location
constructor
A new instance of Location.
- #parse ⇒ Object
Constructor Details
#initialize(payload) ⇒ Location
Returns a new instance of Location.
5 6 7 |
# File 'lib/barometer/weather_services/response/location.rb', line 5 def initialize(payload) @payload = payload end |
Instance Method Details
#parse ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/barometer/weather_services/response/location.rb', line 9 def parse Data::Location.new( id: id, name: name, city: city, state_name: state_name, state_code: state_code, country: country, country_code: country_code, zip_code: zip_code, latitude: latitude, longitude: longitude ) end |