Class: Barometer::WeatherBug::CurrentResponse
- Inherits:
-
Object
- Object
- Barometer::WeatherBug::CurrentResponse
- Defined in:
- lib/barometer/weather_bug/current_response.rb
Instance Method Summary collapse
-
#initialize ⇒ CurrentResponse
constructor
A new instance of CurrentResponse.
- #parse(payload) ⇒ Object
Constructor Details
#initialize ⇒ CurrentResponse
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 |