weather_checker 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/weather_checker.rb +5 -10
- metadata +1 -1
data/lib/weather_checker.rb
CHANGED
@@ -18,6 +18,10 @@ class WeatherChecker
|
|
18
18
|
@weather = weather_obj
|
19
19
|
end
|
20
20
|
|
21
|
+
def temperature_below? celsius_degrees
|
22
|
+
return celsius_degrees.to_i > weather.current.temperature.c
|
23
|
+
end
|
24
|
+
|
21
25
|
def temperature_above? celsius_degrees
|
22
26
|
return celsius_degrees.to_i < weather.current.temperature.c
|
23
27
|
end
|
@@ -36,7 +40,7 @@ class WeatherChecker
|
|
36
40
|
barometer = WeatherChecker.get(location) || Barometer.new(location)
|
37
41
|
weather = barometer.measure
|
38
42
|
WeatherChecker.set(location, barometer)
|
39
|
-
WeatherChecker.new
|
43
|
+
WeatherChecker.new weather
|
40
44
|
end
|
41
45
|
|
42
46
|
private
|
@@ -49,12 +53,3 @@ class WeatherChecker
|
|
49
53
|
end
|
50
54
|
end
|
51
55
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|