Method: RunLoop::Environment.with_debugging
- Defined in:
- lib/run_loop/environment.rb
.with_debugging(debug, &block) ⇒ Object
!@visibility private
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/run_loop/environment.rb', line 218 def self.with_debugging(debug, &block) if debug original_value = ENV['DEBUG'] begin ENV['DEBUG'] = '1' block.call ensure ENV['DEBUG'] = original_value end else block.call end end |