weather-mg 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/weather.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c2ff5b98eb8a2df296d044935db90b2fd4057e4
|
4
|
+
data.tar.gz: 52233aef1594f0685b342e3c571d195cbe9fb3fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c7d9e393040ad97a32d3820c04f3b553c811af1a531a39254f12f721effb58ef12d4affecd56381abbae2b09464af6d0606d2ee8723843832ee8916bba36899
|
7
|
+
data.tar.gz: 903104927c859d66be00845f40b91a8c23e750c043d0d7789893be44f24e4b2686c497435b994595b4cb8968c2db20b40b7c1d26430038bdc7ccf8467785cb02
|
data/lib/weather.rb
CHANGED
@@ -10,7 +10,9 @@ class Weather
|
|
10
10
|
"Now in #{location} the weather is: " + openweather_situation(location)['weather'][0]['description']
|
11
11
|
end
|
12
12
|
|
13
|
-
private
|
13
|
+
private
|
14
|
+
|
15
|
+
def openweather_situation(location)
|
14
16
|
@situation ||= JSON.load(open("http://api.openweathermap.org/data/2.5/weather?q=#{location}"))
|
15
17
|
end
|
16
18
|
end
|