Skip to content

Instantly share code, notes, and snippets.

@mxlje
Created October 1, 2013 11:16
Show Gist options
  • Save mxlje/6776985 to your computer and use it in GitHub Desktop.
Save mxlje/6776985 to your computer and use it in GitHub Desktop.
# Checks status code of multiple URLs and prints them
require "mechanize"
urls = [
'http://maxlielje.co'
]
@agent = Mechanize.new
urls.each { |url| puts "[#{@agent.get(url).code }] :: #{url}" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment