geonames_api 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/geonames_api/version.rb +1 -1
- data/lib/geonames_api/weather.rb +6 -6
- metadata +1 -1
data/lib/geonames_api/version.rb
CHANGED
data/lib/geonames_api/weather.rb
CHANGED
@@ -26,11 +26,11 @@ module GeoNamesAPI
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def elevation_feet
|
29
|
-
elevation * 3.28084
|
29
|
+
elevation * 3.28084 if elevation
|
30
30
|
end
|
31
31
|
|
32
32
|
def elevation_meters
|
33
|
-
elevation
|
33
|
+
elevation if elevation
|
34
34
|
end
|
35
35
|
|
36
36
|
def convert_c_to_f(temp)
|
@@ -38,19 +38,19 @@ module GeoNamesAPI
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def temperature_f
|
41
|
-
convert_c_to_f(temperature)
|
41
|
+
convert_c_to_f(temperature) if temperature
|
42
42
|
end
|
43
43
|
|
44
44
|
def temperature_c
|
45
|
-
temperature
|
45
|
+
temperature if temperature
|
46
46
|
end
|
47
47
|
|
48
48
|
def dew_point_f
|
49
|
-
convert_c_to_f(dew_point)
|
49
|
+
convert_c_to_f(dew_point) if temperature
|
50
50
|
end
|
51
51
|
|
52
52
|
def dew_point_c
|
53
|
-
dew_point
|
53
|
+
dew_point if temperature
|
54
54
|
end
|
55
55
|
|
56
56
|
end
|