Sha256: 021ed8909a317e656017c44aa86a4d7f2775a45815a2c5ab8ac242503319e77e

Contents?: true

Size: 566 Bytes

Versions: 8

Compression:

Stored size: 566 Bytes

Contents

module Barometer
  module WeatherService
    class WundergroundV1
      class Response
        class FullTimeZone < WeatherService::Response::TimeZone
          def parse
            payload.fetch_each('simpleforecast', 'forecastday') do |forecast_payload|
              timezone = timezone(forecast_payload)
              return Data::Zone.new(timezone) if timezone
            end
          end

          private

          def timezone(forecast_payload)
            forecast_payload.fetch('date', 'tz_long')
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
barometer-0.9.7 lib/barometer/weather_services/wunderground_v1/response/full_timezone.rb
barometer-0.9.6 lib/barometer/weather_services/wunderground_v1/response/full_timezone.rb
barometer-0.9.5 lib/barometer/weather_services/wunderground_v1/response/full_timezone.rb
barometer-0.9.4 lib/barometer/weather_services/wunderground_v1/response/full_timezone.rb
barometer-0.9.3 lib/barometer/weather_services/wunderground_v1/response/full_timezone.rb
barometer-0.9.2 lib/barometer/weather_services/wunderground_v1/response/full_timezone.rb
barometer-0.9.1 lib/barometer/weather_services/wunderground_v1/response/full_timezone.rb
barometer-0.9.0 lib/barometer/weather_services/wunderground_v1/response/full_timezone.rb