for instance if we have www.google.com and would want to save the source
of that page to a text pad is there any way we can get this done in
ruby?
require 'net/http'
h = Net::HTTP.new('www.pragmaticprogrammer.com', 80)
resp, data = h.get('/index.html', nil)
if resp.message == "OK"
puts data
end
you have the html of the page in the data variable