Class: Barometer::WeatherBug::ForecastResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/barometer/weather_bug/forecast_response.rb

Instance Method Summary collapse

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