lib/undergroundweather/features/current_conditions.rb in undergroundweather-0.0.2 vs lib/undergroundweather/features/current_conditions.rb in undergroundweather-0.0.3
- old
+ new
@@ -4,11 +4,11 @@
:longitude, :elevation, :time_zone,
:time, :station, :weather, :temp_f, :temp_c,
:humidity, :wind, :wind_dir, :wind_mph, :icon, :url,
:heat_index_f, :heat_index_c, :dewpoint_f, :dewpoint_c,
:windchill_f, :windchill_c, :visibility_mi, :visibility_km,
- :pressure_mb, :pressure_in
+ :pressure_mb, :pressure_in, :precip_hour, :precip_today
def initialize(feed)
obsv = feed['current_observation']
@city = obsv['display_location']['city']
@@ -38,9 +38,11 @@
@dewpoint_c = obsv['dewpoint_c']
@visibility_mi = obsv['visibility_mi']
@visibility_km = obsv['visibility_km']
@pressure_mb = obsv['pressure_mb']
@pressure_in = obsv['pressure_in']
+ @precip_today = obsv['precip_today_in']
+ @precip_hour = obsv['precip_1hr_in']
@icon = obsv['icon_url']
@url = obsv['forecast_url']
end
\ No newline at end of file