Skip to content

Instantly share code, notes, and snippets.

@t0nylombardi
Created May 25, 2016 15:37
Show Gist options
  • Save t0nylombardi/4bbca9cf54543c90b7410e6552308ba7 to your computer and use it in GitHub Desktop.
Save t0nylombardi/4bbca9cf54543c90b7410e6552308ba7 to your computer and use it in GitHub Desktop.
File.open("url_links_04282016-PALM.html", "w+") do |f|
HTML_START = <<-EOS
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
EOS
HTML_END = <<-EOS
</body>
</html>
EOS
f.write HTML_START # Writes begening html
f.write "<h1>Results</h1>"
########
## Your Meat and Potatoes of web data goes here
########
f.write HTML_END # Writes begening html
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment