lib/geonames_api/weather.rb in geonames_api-0.0.5 vs lib/geonames_api/weather.rb in geonames_api-0.0.6
- old
+ new
@@ -24,34 +24,34 @@
def at_utc
at_local.utc
end
def elevation_feet
- elevation * 3.28084
+ elevation * 3.28084 if elevation
end
def elevation_meters
- elevation
+ elevation if elevation
end
def convert_c_to_f(temp)
temp * 9.to_f / 5.to_f + 32
end
def temperature_f
- convert_c_to_f(temperature)
+ convert_c_to_f(temperature) if temperature
end
def temperature_c
- temperature
+ temperature if temperature
end
def dew_point_f
- convert_c_to_f(dew_point)
+ convert_c_to_f(dew_point) if temperature
end
def dew_point_c
- dew_point
+ dew_point if temperature
end
end
end
\ No newline at end of file