1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
%w[rubygems builder open-uri].each{|x| require x}
count = 1
RandList = URI("http://random.org/cgi-bin/randnum?num=#{count}&min=1&max=100").read
Builder::XmlMarkup.new(:target => STDOUT, :indent => 2).instance_eval do
  instruct! :xml, :version => "1.0", :encoding => "UTF-8"
  rss :version => "2.0" do
    channel do
      title "RandFeed"
      description "RandFeed"
      link "http://"
      RandList.scan(/\d+/) do |num|
        item { description num }
      end
    end
  end
end