Class: Weather::Wind

Inherits:
Object
  • Object
show all
Defined in:
lib/wind.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#docObject (readonly)

Returns the value of attribute doc.



4
5
6
# File 'lib/wind.rb', line 4

def doc
  @doc
end

Instance Method Details

#descriptionObject

Wind description



26
27
28
# File 'lib/wind.rb', line 26

def description
	doc.at("t").innerHTML
end

#directionObject

Wind direction



21
22
23
# File 'lib/wind.rb', line 21

def direction
	doc.at("d").innerHTML
end

#gust_speedObject

Wind gust speed



16
17
18
# File 'lib/wind.rb', line 16

def gust_speed
	doc.at("gust").innerHTML
end

#speedObject

Wind speed



11
12
13
# File 'lib/wind.rb', line 11

def speed
	doc.at("s").innerHTML
end