jagthedrummer-yahoo-weather 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/yahoo-weather.rb +7 -6
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.4
|
data/lib/yahoo-weather.rb
CHANGED
@@ -255,11 +255,11 @@ module YahooWeather
|
|
255
255
|
@page_url = item['link']
|
256
256
|
@title = item['title']
|
257
257
|
@description = item['description']
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
258
|
+
|
259
|
+
match_data = @@REGEXP_IMAGE.match(description)
|
260
|
+
@image_url = (match_data) ? match_data[1] : nil
|
261
|
+
|
262
|
+
|
263
263
|
end
|
264
264
|
end
|
265
265
|
|
@@ -292,9 +292,10 @@ module YahooWeather
|
|
292
292
|
rescue
|
293
293
|
raise "failed to get weather via '#{url}': " + $!
|
294
294
|
end
|
295
|
-
|
295
|
+
|
296
296
|
# create the response object
|
297
297
|
response = XmlSimple.xml_in(response)
|
298
|
+
|
298
299
|
YahooWeather::Response.new(location, url, response)
|
299
300
|
end
|
300
301
|
|