DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Peter has posted 12 posts at DZone. View Full User Profile

Using Rio From Ruby To Easily Save A Web Page To File

  • submit to reddit
        Found at <a href=""></a>

# (sudo) gem install rio
require 'rubygems'
require 'rio'
# open an URI an copy the content into a file
rio('') > rio('juretta_index.html')

Cool syntax!    


Snippets Manager replied on Tue, 2006/11/14 - 7:44pm

I knew there must be an easy way to do this with ruby.