Module: Sensu::Sandbox

Defined in:
lib/sensu/extensions/filters/attributes.rb

Class Method Summary collapse

Class Method Details

.eval(eval_string, value = nil) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/sensu/extensions/filters/attributes.rb', line 5

def self.eval(eval_string, value=nil)
  result = Proc.new do
    $SAFE = (RUBY_VERSION < "2.1.0" ? 4 : 3)
    Kernel.eval(eval_string)
  end
  result.call
end