Skip to content

Instantly share code, notes, and snippets.

@jqr
Created February 12, 2010 23:16
Show Gist options
  • Save jqr/303100 to your computer and use it in GitHub Desktop.
Save jqr/303100 to your computer and use it in GitHub Desktop.
# See install instructions @ http://github.com/mynyml/harmony
require 'rubygems'
require 'harmony'
$: << '/Library/Ruby/Gems/1.8/gems/harmony-0.5.1/vendor/envjs/lib'
page = Harmony::Page.fetch('http://example.com')
puts page.execute_js('document.title') #=> "Example Web Page"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment