Class: Weather::Wind
- Inherits:
-
Object
- Object
- Weather::Wind
- Defined in:
- lib/wind.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
Instance Method Summary collapse
-
#description ⇒ Object
Wind description.
-
#direction ⇒ Object
Wind direction.
-
#gust_speed ⇒ Object
Wind gust speed.
-
#initialize(doc) ⇒ Wind
constructor
A new instance of Wind.
-
#speed ⇒ Object
Wind speed.
Constructor Details
#initialize(doc) ⇒ Wind
Returns a new instance of Wind.
6 7 8 |
# File 'lib/wind.rb', line 6 def initialize(doc) @doc = doc end |
Instance Attribute Details
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
4 5 6 |
# File 'lib/wind.rb', line 4 def doc @doc end |
Instance Method Details
#description ⇒ Object
Wind description
26 27 28 |
# File 'lib/wind.rb', line 26 def description doc.at("t").innerHTML end |
#direction ⇒ Object
Wind direction
21 22 23 |
# File 'lib/wind.rb', line 21 def direction doc.at("d").innerHTML end |
#gust_speed ⇒ Object
Wind gust speed
16 17 18 |
# File 'lib/wind.rb', line 16 def gust_speed doc.at("gust").innerHTML end |
#speed ⇒ Object
Wind speed
11 12 13 |
# File 'lib/wind.rb', line 11 def speed doc.at("s").innerHTML end |