Class: TTK::Strategies::Strategy::AssertEval

Inherits:
SafeEval
  • Object
show all
Defined in:
lib/ttk/strategies/Strategy/assert_eval.rb

Instance Method Summary collapse

Constructor Details

#initializeAssertEval

Returns a new instance of AssertEval.



18
19
20
# File 'lib/ttk/strategies/Strategy/assert_eval.rb', line 18

def initialize
  super(3, true)
end

Instance Method Details

#run(code_str = '', binding = {}, filename = '(AssertEval)', lineno = 1) ⇒ Object



22
23
24
25
26
# File 'lib/ttk/strategies/Strategy/assert_eval.rb', line 22

def run(code_str='', binding={}, filename='(AssertEval)', lineno=1)
  code_str.strip!
  return nil if code_str.empty?
  super(code_str, get_binding(binding), filename, lineno)
end