Class: Barometer::WeatherBug::ForecastResponse
- Inherits:
-
Object
- Object
- Barometer::WeatherBug::ForecastResponse
- Defined in:
- lib/barometer/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.
6 7 8 |
# File 'lib/barometer/weather_bug/forecast_response.rb', line 6 def initialize(response) @response = response end |
Instance Method Details
#parse(payload) ⇒ Object
10 11 12 13 |
# File 'lib/barometer/weather_bug/forecast_response.rb', line 10 def parse(payload) response.forecast = WeatherBug::Response::ForecastedWeather.new(payload).parse response end |