Sha256: f743a065a2d40b291dbea37bc1f4ed11cefe5d3e3d96b028493075b95965284e

Contents?: true

Size: 800 Bytes

Versions: 6

Compression:

Stored size: 800 Bytes

Contents

require_relative 'response/timezone'
require_relative 'response/current_location'
require_relative 'response/current_station'
require_relative 'response/current_weather'

module Barometer
  module WeatherService
    class Noaa
      class CurrentResponse
        def initialize(response)
          @response = response
        end

        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

        private

        attr_reader :response
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
barometer-0.9.5 lib/barometer/weather_services/noaa/current_response.rb
barometer-0.9.4 lib/barometer/weather_services/noaa/current_response.rb
barometer-0.9.3 lib/barometer/weather_services/noaa/current_response.rb
barometer-0.9.2 lib/barometer/weather_services/noaa/current_response.rb
barometer-0.9.1 lib/barometer/weather_services/noaa/current_response.rb
barometer-0.9.0 lib/barometer/weather_services/noaa/current_response.rb