Class: YahooWeather::Wind
- Inherits:
-
Object
- Object
- YahooWeather::Wind
- Defined in:
- lib/yahoo-weather.rb
Overview
Describes the specific wind conditions at a location.
Instance Attribute Summary collapse
-
#chill ⇒ Object
readonly
the temperature factoring in wind chill.
-
#direction ⇒ Object
readonly
the direction of the wind in degrees.
-
#speed ⇒ Object
readonly
the speed of the wind.
Instance Method Summary collapse
-
#initialize(payload) ⇒ Wind
constructor
A new instance of Wind.
Constructor Details
#initialize(payload) ⇒ Wind
Returns a new instance of Wind.
91 92 93 94 95 |
# File 'lib/yahoo-weather.rb', line 91 def initialize (payload) @chill = payload['chill'].to_i @direction = payload['direction'].to_i @speed = payload['speed'].to_i end |
Instance Attribute Details
#chill ⇒ Object (readonly)
the temperature factoring in wind chill.
83 84 85 |
# File 'lib/yahoo-weather.rb', line 83 def chill @chill end |
#direction ⇒ Object (readonly)
the direction of the wind in degrees.
86 87 88 |
# File 'lib/yahoo-weather.rb', line 86 def direction @direction end |
#speed ⇒ Object (readonly)
the speed of the wind.
89 90 91 |
# File 'lib/yahoo-weather.rb', line 89 def speed @speed end |