Class: SafeEval

Inherits:
Object show all
Defined in:
lib/safe_eval.rb

Class Method Summary collapse

Class Method Details

.with_level(level) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/safe_eval.rb', line 9

def self.with_level(level)
  old = $eval_safe_level
  $eval_safe_level = level
  yield
ensure
  $eval_safe_level = old
end