Retrieving the 1st item from an RSS feed using the RSS_to_Dynarex gem

require 'rss_to_dynarex'

rtd = RSStoDynarex.new 'http://stallman.org/rss/rss.xml'

rtd.to_dynarex.to_h.first[:title]
#=> "Urgent: Extension of unemployment benefits" 

rtd.to_dynarex.to_h.first[:description]
#=> "<p>\nUS citizens: \n<a href=\"http://vbx.campaignforamericasfuture...

Tags:
Source:
2113hrs.txt
Published:
30-01-2014 21:13