From: Thomas Wieczorek Date: 2008-02-13T22:46:52+09:00 Subject: Re: most useful instance methods On Wed, Feb 13, 2008 at 8:52 AM, James Britt wrote: > > > Write a ruby app that grabs a random API page from ruby-doc.org and > brings it up in a browser. > What a great idea! I just wrote it. Thank you! For those interested: It uses the Windows start command to open a site from the Ruby 1.8.6 Core rubydoc list. require 'open-uri' require 'hpricot' base = "http://ruby-doc.org/core/" topic_site = Hpricot(open(base + "fr_class_index.html")) list = topic_site.search("//div[@id='index-entries']/a[@href]") system("start " + base + list[rand(list.length)].attributes['href'])