Class: Barometer::Noaa::CurrentResponse
- Inherits:
-
Object
- Object
- Barometer::Noaa::CurrentResponse
- Defined in:
- lib/barometer/noaa/current_response.rb
Instance Method Summary collapse
-
#initialize(response) ⇒ CurrentResponse
constructor
A new instance of CurrentResponse.
- #parse(payload) ⇒ Object
Constructor Details
#initialize(response) ⇒ CurrentResponse
9 10 11 |
# File 'lib/barometer/noaa/current_response.rb', line 9 def initialize(response) @response = response end |
Instance Method Details
#parse(payload) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/barometer/noaa/current_response.rb', line 13 def parse(payload) response.timezone = Noaa::Response::TimeZone.new(payload).parse response.location = Noaa::Response::CurrentLocation.new(payload, response).parse response.station = Noaa::Response::CurrentStation.new(payload, response).parse response.current = Noaa::Response::CurrentWeather.new(payload).parse response end |