Class: Barometer::ForecastIo::Response
- Inherits:
-
Object
- Object
- Barometer::ForecastIo::Response
- Defined in:
- lib/barometer/forecast_io/response.rb,
lib/barometer/forecast_io/response/location.rb,
lib/barometer/forecast_io/response/timezone.rb,
lib/barometer/forecast_io/response/current_weather.rb,
lib/barometer/forecast_io/response/forecasted_weather.rb
Defined Under Namespace
Classes: CurrentWeather, ForecastedWeather, Location, TimeZone
Instance Method Summary collapse
-
#initialize ⇒ Response
constructor
A new instance of Response.
- #parse(payload) ⇒ Object
Constructor Details
Instance Method Details
#parse(payload) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/barometer/forecast_io/response.rb', line 13 def parse(payload) response.add_query(payload.query) response.timezone = ForecastIo::Response::TimeZone.new(payload).parse response.location = ForecastIo::Response::Location.new(payload).parse response.current = ForecastIo::Response::CurrentWeather.new(payload).parse response.forecast = ForecastIo::Response::ForecastedWeather.new(payload).parse response end |