Created
February 9, 2010 10:51
-
-
Save chrislo/299094 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
# put this in your ~/.irbrc | |
def write_to_file(content, filename = "output.txt") | |
File.open(filename, 'w') {|f| f.write(content)} | |
puts "Wrote to #{filename}" | |
return true | |
end | |
# then in an irb console you can do | |
require 'smithy' | |
response = ForgeProxy.get('http://some.url/') | |
write_to_file(response) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment