Ruby Programming/Standard Library/OpenURI

OpenURI

edit

OpenURI can be used to download a web page. Ex:

require 'open-uri'

URI.open("http://www.ruby-lang.org/") {|f|
  f.each_line {|line| p line}
}

See also Net::HTTP