Module: Console1984::ProtectedContext
- Includes:
- FrozenMethods
- Defined in:
- lib/console1984/protected_context.rb
Instance Method Summary collapse
- #evaluate(line, line_no, exception: nil) ⇒ Object
-
#inspect_last_value ⇒ Object
This method is invoked for showing returned objects in the console Overridden to make sure their evaluation is supervised.
Instance Method Details
#evaluate(line, line_no, exception: nil) ⇒ Object
11 12 13 14 15 |
# File 'lib/console1984/protected_context.rb', line 11 def evaluate(line, line_no, exception: nil) Console1984.supervisor.execute_supervised(Array(line)) do super end end |
#inspect_last_value ⇒ Object
This method is invoked for showing returned objects in the console Overridden to make sure their evaluation is supervised.
4 5 6 7 8 |
# File 'lib/console1984/protected_context.rb', line 4 def inspect_last_value Console1984.supervisor.execute do super end end |