Created
December 16, 2009 13:31
-
-
Save atomicules/257819 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
# testing mechanize in Ruby 1.9 based Shoes | |
# Assumes Mechanize is installed local to application | |
# Others might need this code: | |
=begin | |
Shoes.setup do | |
gem 'mechanize = 0.8.5' #mechanize 0.8.5 saves having to install nokogiri | |
end | |
=end | |
require 'rubygems' | |
require 'mechanize' | |
Shoes.app do | |
Agent = WWW::Mechanize.new | |
page = Agent.get('http://www.google.com/') | |
para page.body | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment