Class: Net::HTTP
- Inherits:
-
Object
- Object
- Net::HTTP
- Defined in:
- lib/check_file_syntax.rb
Class Method Summary collapse
Class Method Details
.disable_debug! ⇒ Object
21 22 23 24 25 26 |
# File 'lib/check_file_syntax.rb', line 21 def self.disable_debug! class << self alias_method :new, :__new__ remove_method :__new__ end end |
.enable_debug! ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/check_file_syntax.rb', line 10 def self.enable_debug! class << self alias_method :__new__, :new def new(*args, &blk) instance = __new__(*args, &blk) instance.set_debug_output($stderr) instance end end end |