Class: Yweather::Wind
- Inherits:
-
Object
- Object
- Yweather::Wind
- Defined in:
- lib/yweather/wind.rb
Instance Attribute Summary collapse
-
#chill ⇒ Object
readonly
Returns the value of attribute chill.
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#speed ⇒ Object
readonly
Returns the value of attribute speed.
Instance Method Summary collapse
-
#initialize(data) ⇒ Wind
constructor
A new instance of Wind.
Constructor Details
#initialize(data) ⇒ Wind
Returns a new instance of Wind.
8 9 10 11 12 |
# File 'lib/yweather/wind.rb', line 8 def initialize(data) @chill = data[:chill].to_i @direction = data[:direction].to_i @speed = data[:speed].to_i end |
Instance Attribute Details
#chill ⇒ Object (readonly)
Returns the value of attribute chill.
4 5 6 |
# File 'lib/yweather/wind.rb', line 4 def chill @chill end |
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
5 6 7 |
# File 'lib/yweather/wind.rb', line 5 def direction @direction end |
#speed ⇒ Object (readonly)
Returns the value of attribute speed.
6 7 8 |
# File 'lib/yweather/wind.rb', line 6 def speed @speed end |