Module: Console1984::Ext::Irb::Context
- Includes:
- Freezeable
- Defined in:
- lib/console1984/ext/irb/context.rb
Overview
Extends IRB execution contexts to hijack execution attempts and pass them through Console1984.
Instance Method Summary collapse
- #evaluate(line) ⇒ Object
-
#inspect_last_value ⇒ Object
This method is invoked for showing returned objects in the console Overridden to make sure their evaluation is supervised.
Methods included from Freezeable
Instance Method Details
#evaluate(line) ⇒ Object
15 16 17 18 19 |
# File 'lib/console1984/ext/irb/context.rb', line 15 def evaluate(line, ...) Console1984.command_executor.execute(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.
8 9 10 11 12 |
# File 'lib/console1984/ext/irb/context.rb', line 8 def inspect_last_value Console1984.command_executor.execute_in_protected_mode do super end end |