Skip to content

Instantly share code, notes, and snippets.

@practicingruby
Created August 6, 2008 05:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save practicingruby/4168 to your computer and use it in GitHub Desktop.
Save practicingruby/4168 to your computer and use it in GitHub Desktop.
RSS parsing for Blaag
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