Class: Weather::FutureEstimate
- Inherits:
-
Object
- Object
- Weather::FutureEstimate
- Defined in:
- lib/future_estimate.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
Instance Method Summary collapse
-
#description ⇒ Object
Description.
-
#high ⇒ Object
High temperature.
-
#humidity ⇒ Object
Humidity.
-
#icon ⇒ Object
Icon.
-
#initialize(doc) ⇒ FutureEstimate
constructor
A new instance of FutureEstimate.
-
#low ⇒ Object
Low temperature.
-
#precipitation ⇒ Object
Precipitation.
-
#sunrise ⇒ Object
Sunrise.
-
#sunset ⇒ Object
Sunset.
-
#wind ⇒ Object
Wind conditions.
Constructor Details
#initialize(doc) ⇒ FutureEstimate
Returns a new instance of FutureEstimate.
6 7 8 |
# File 'lib/future_estimate.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/future_estimate.rb', line 4 def doc @doc end |
Instance Method Details
#description ⇒ Object
Description
16 17 18 |
# File 'lib/future_estimate.rb', line 16 def description part.at("t").innerHTML end |
#high ⇒ Object
High temperature
31 32 33 |
# File 'lib/future_estimate.rb', line 31 def high doc.at("hi").innerHTML end |
#humidity ⇒ Object
Humidity
26 27 28 |
# File 'lib/future_estimate.rb', line 26 def humidity part.at("hmid").innerHTML end |
#icon ⇒ Object
Icon
11 12 13 |
# File 'lib/future_estimate.rb', line 11 def icon part.at("icon").innerHTML end |
#low ⇒ Object
Low temperature
36 37 38 |
# File 'lib/future_estimate.rb', line 36 def low doc.at("low").innerHTML end |
#precipitation ⇒ Object
Precipitation
21 22 23 |
# File 'lib/future_estimate.rb', line 21 def precipitation part.at("ppcp").innerHTML end |
#sunrise ⇒ Object
Sunrise
41 42 43 |
# File 'lib/future_estimate.rb', line 41 def sunrise doc.at("sunr").innerHTML end |
#sunset ⇒ Object
Sunset
46 47 48 |
# File 'lib/future_estimate.rb', line 46 def sunset doc.at("suns").innerHTML end |