Created
March 20, 2011 05:25
-
-
Save samstokes/878105 to your computer and use it in GitHub Desktop.
Callbacks? What callbacks?
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 'em-http' | |
require 'hpricot' | |
class EM::HttpRequest | |
synchronous_shim! :get | |
end | |
Hpricot(EM::HttpRequest.new('http://www.samstokes.co.uk/').get.response).at(:title).inner_text | |
# => "Sam Stokes" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment