Class: YahooWeather::Wind

Inherits:
Object
  • Object
show all
Defined in:
lib/yahoo-weather/wind.rb

Overview

Describes the specific wind conditions at a location.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ Wind

Returns a new instance of Wind.



12
13
14
15
16
# File 'lib/yahoo-weather/wind.rb', line 12

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

Instance Attribute Details

#chillObject (readonly)

the temperature factoring in wind chill.



4
5
6
# File 'lib/yahoo-weather/wind.rb', line 4

def chill
  @chill
end

#directionObject (readonly)

the direction of the wind in degrees.



7
8
9
# File 'lib/yahoo-weather/wind.rb', line 7

def direction
  @direction
end

#speedObject (readonly)

the speed of the wind.



10
11
12
# File 'lib/yahoo-weather/wind.rb', line 10

def speed
  @speed
end