Sha256: 4d603509a3564dbd0d9ef9f4aa9fe2e978606a427ddf69319419776680735cae

Contents?: true

Size: 864 Bytes

Versions: 8

Compression:

Stored size: 864 Bytes

Contents

module Barometer
  module WeatherService
    class WundergroundV1
      class Response
        class Station < WeatherService::Response::Location
          private

          def id
            payload.fetch('station_id')
          end

          def name
            payload.fetch('observation_location', 'full')
          end

          def city
            payload.fetch('observation_location', 'city')
          end

          def state_code
            payload.fetch('observation_location', 'state')
          end

          def country_code
            payload.fetch('observation_location', 'country')
          end

          def latitude
            payload.fetch('observation_location', 'latitude')
          end

          def longitude
            payload.fetch('observation_location', 'longitude')
          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/station.rb
barometer-0.9.6 lib/barometer/weather_services/wunderground_v1/response/station.rb
barometer-0.9.5 lib/barometer/weather_services/wunderground_v1/response/station.rb
barometer-0.9.4 lib/barometer/weather_services/wunderground_v1/response/station.rb
barometer-0.9.3 lib/barometer/weather_services/wunderground_v1/response/station.rb
barometer-0.9.2 lib/barometer/weather_services/wunderground_v1/response/station.rb
barometer-0.9.1 lib/barometer/weather_services/wunderground_v1/response/station.rb
barometer-0.9.0 lib/barometer/weather_services/wunderground_v1/response/station.rb