open_weather_map 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/open_weather_map/base.rb +13 -0
- data/lib/open_weather_map/version.rb +1 -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: 5c09d07a38408ae741c5a12d3d039aac1717e1b7
|
4
|
+
data.tar.gz: 745edcdb21722d727a9db0f13a727487c437972a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3f3dc91e5e17d152bd8497a2eb339b8bd5ca3683b966f4194471600fdddf41fcfd5497704cb96791f6c4205178c856d9a9c998bc22607316ed5360fdbbc36e7
|
7
|
+
data.tar.gz: b37a07a14502a2ddd7cfcf0ade73a88f58f87f60db4617f1ee76cca6b8f81cf74a5dea8d97db1d8262968b1b73f42ec672288551b5c1f33cd4ec0b7672035f34
|
@@ -15,6 +15,19 @@ module OpenWeatherMap
|
|
15
15
|
@response['main']['temp_max']
|
16
16
|
end
|
17
17
|
|
18
|
+
def cond_jp
|
19
|
+
jp_cond = ''
|
20
|
+
case @response['weather'][0]['main']
|
21
|
+
when 'Clear' then jp_cond = '晴れ'
|
22
|
+
when 'Clouds' then jp_cond = '曇り'
|
23
|
+
when 'Snow' then jp_cond = '雪'
|
24
|
+
when 'Rain' then jp_cond = '雨'
|
25
|
+
else jp_cond = 'その他'
|
26
|
+
end
|
27
|
+
|
28
|
+
return jp_cond
|
29
|
+
end
|
30
|
+
|
18
31
|
def temp_min_celsius
|
19
32
|
to_celsius @response['main']['temp_min']
|
20
33
|
end
|