Class: Weather::Day
- Inherits:
-
FutureEstimate
- Object
- FutureEstimate
- Weather::Day
- Defined in:
- lib/day.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
Instance Method Summary collapse
-
#initialize(doc) ⇒ Day
constructor
A new instance of Day.
-
#part ⇒ Object
Select day part in the doc.
Methods inherited from FutureEstimate
#description, #high, #humidity, #icon, #low, #precipitation, #sunrise, #sunset, #wind
Constructor Details
#initialize(doc) ⇒ Day
Returns a new instance of Day.
8 9 10 |
# File 'lib/day.rb', line 8 def initialize(doc) super(doc) end |
Instance Attribute Details
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
6 7 8 |
# File 'lib/day.rb', line 6 def doc @doc end |
Instance Method Details
#part ⇒ Object
Select day part in the doc
13 14 15 16 17 18 19 20 |
# File 'lib/day.rb', line 13 def part day = nil (doc/"part").each do |d| if d.attributes["p"] == "d" day = d end end end |