From: James Britt Date: 2005-06-01T13:42:32+09:00 Subject: Re: TinyUrl class Vincent Foley wrote: > Hi everyone, > > I wrote a small TinyUrl class today. Very simple, probably not very > stable, but it does the job, so I'll post it here in case someone needs > something like that. > > class TinyUrl > def initialize(url) > @url = url > end > > def shorten > Net::HTTP.start("tinyurl.com", 80) { |http| Um, I'm pretty sure that should be Net::HTTP.start("www.rubyurl.com", 80) { |http| :) James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys