Class: Barometer::WeatherService::WeatherBug::ForecastResponse
- Inherits:
-
Object
- Object
- Barometer::WeatherService::WeatherBug::ForecastResponse
- Defined in:
- lib/barometer/weather_services/weather_bug/forecast_response.rb
Instance Method Summary collapse
-
#initialize(response) ⇒ ForecastResponse
constructor
A new instance of ForecastResponse.
- #parse(payload) ⇒ Object
Constructor Details
#initialize(response) ⇒ ForecastResponse
Returns a new instance of ForecastResponse.
8 9 10 |
# File 'lib/barometer/weather_services/weather_bug/forecast_response.rb', line 8 def initialize(response) @response = response end |
Instance Method Details
#parse(payload) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/barometer/weather_services/weather_bug/forecast_response.rb', line 12 def parse(payload) response.forecast = WeatherBug::Response::ForecastedWeather.new(payload, timezone).parse response.location = WeatherBug::Response::Location.new(payload).parse response end |