Module: Luffa::Debug

Defined in:
lib/luffa/with_debugging.rb

Class Method Summary collapse

Class Method Details

.with_debugging(&block) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/luffa/with_debugging.rb', line 3

def self.with_debugging(&block)
  original_value = ENV['DEBUG']
  ENV['DEBUG'] = '1'
  begin
    block.call
  ensure
    ENV['DEBUG'] = original_value
  end
end