Created
August 6, 2008 05:02
-
-
Save practicingruby/4168 to your computer and use it in GitHub Desktop.
RSS parsing for Blaag
This file contains 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
def to_rss | |
xml = Builder::XmlMarkup.new | |
xml.instruct! | |
xml.rss :version => "2.0" do | |
xml.channel do | |
xml.title TITLE | |
xml.link "http://#{DOMAIN}/" | |
xml.description DESCRIPTION | |
xml.language "en-us" | |
@entries.each do |entry| | |
xml.item do | |
xml.title entry.title | |
xml.description entry.description | |
xml.author AUTHOR | |
xml.pubDate entry.published_date | |
xml.link entry.url | |
xml.guid entry.url | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment