Class: Barometer::WeatherBug::CurrentResponse

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

Instance Method Summary collapse

Constructor Details

#initializeCurrentResponse



6
7
8
# File 'lib/barometer/weather_bug/current_response.rb', line 6

def initialize
  @response = Barometer::Response.new
end

Instance Method Details

#parse(payload) ⇒ Object



10
11
12
13
14
# File 'lib/barometer/weather_bug/current_response.rb', line 10

def parse(payload)
  response.add_query(payload.query)
  response.current = WeatherBug::Response::CurrentWeather.new(payload).parse
  response
end