Created
October 23, 2010 09:19
-
-
Save maricris-sn/641989 to your computer and use it in GitHub Desktop.
As seen in: http://sweetperceptions.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Think Geek Code (controller) [ruby] | |
def thinkGeek | |
require 'rss' | |
rss = RSS::Parser.parse(open('http://www.thinkgeek.com/xml/app/wishlist/id/').read, false) | |
@output = "" + rss.channel.description + "" | |
@output += "" | |
rss.items.each_with_index do |item,i| | |
@output += "" + item.title + "" | |
end | |
@output += "" | |
rescue | |
@output = 'Uh oh! Seems like something is wrong.. Try again later.' | |
return @output | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment