Created
May 18, 2016 22:40
-
-
Save anonymous/03a0695e838f1c8cbd12a8e17fd5aa86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'rest-client' | |
STDOUT.sync = true | |
fn = "website_output.txt" | |
File.open(fn, "w") { |fstream| | |
fstream.write(RestClient.get("https://digg.com")) | |
} | |
content = File.open(fn, "r") { |fstream| | |
fstream.read | |
} | |
puts content | |
puts "\n\n\nnew read" | |
puts content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment