Skip to content

Instantly share code, notes, and snippets.

View andrehjr's full-sized avatar

André Luis Leal Cardoso Jr andrehjr

  • Florianópolis, Imbituba - SC - Brazil
View GitHub Profile

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

require 'net/http'
module Net
class HTTP
def self.enable_debug!
# raise "You don't want to do this in anything but development mode!" unless Rails.env == 'development'
class << self
alias_method :__new__, :new
def new(*args, &blk)
instance = __new__(*args, &blk)
instance.set_debug_output($stderr)