Sha256: 7f5d8de7187e7f62ebff0ce6312969ad93c99c855d4565cf38f938c25f3857da

Contents?: true

Size: 380 Bytes

Versions: 3

Compression:

Stored size: 380 Bytes

Contents

module Weather
  class Wind
    # the temperature, with wind chill factored in
    attr_reader :chill

    # the direction of the wind in degrees
    attr_reader :direction

    # the windspeed
    attr_reader :speed

    def initialize(payload)
      @chill = payload[:chill].to_i
      @direction = payload[:direction].to_i
      @speed = payload[:speed].to_i
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
weather-api-1.4.0 lib/weather-api/wind.rb
weather-api-1.3.0 lib/weather-api/wind.rb
weather-api-1.2.0 lib/weather-api/wind.rb