lib/accuweather/conditions/parser.rb in accuweather-0.1.1 vs lib/accuweather/conditions/parser.rb in accuweather-0.1.3
- old
+ new
@@ -5,22 +5,22 @@
@doc = Nokogiri::XML.parse(response)
end
def units
units = @doc.css('units').first
- Accuweather::Conditions::Units.new(temp: units.css('temp').text,
- dist: units.css('dist').text,
+ Accuweather::Conditions::Units.new(temperature: units.css('temp').text,
+ distance: units.css('dist').text,
speed: units.css('speed').text,
- pres: units.css('pres').text,
- prec: units.css('prec').text)
+ pressure: units.css('pres').text,
+ precipitation: units.css('prec').text)
end
def local
local = @doc.css('local').first
Accuweather::Conditions::Local.new(city: local.css('city').text,
state: local.css('state').text,
- lat: local.css('lat').text,
- lon: local.css('lon').text,
+ latitude: local.css('lat').text,
+ longitude: local.css('lon').text,
time: local.css('time').text,
time_zone: local.css('timeZone').text,
obs_daylight: local.css('obsDaylight').text.strip,
current_gmt_offset: local.css('currentGmtOffset').text,
time_zone_abbreviation: local.css('timeZoneAbbreviation').text,
\ No newline at end of file