Class: Weather::Day

Inherits:
FutureEstimate show all
Defined in:
lib/day.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#docObject (readonly)

Returns the value of attribute doc.



6
7
8
# File 'lib/day.rb', line 6

def doc
  @doc
end

Instance Method Details

#partObject

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