Class: Byebug::ScriptProcessor
- Inherits:
-
CommandProcessor
- Object
- CommandProcessor
- Byebug::ScriptProcessor
- Defined in:
- lib/byebug/processors/script_processor.rb
Overview
Processes commands from a file
Instance Attribute Summary
Attributes inherited from CommandProcessor
#context, #interface, #prev_line
Instance Method Summary collapse
- #after_repl ⇒ Object
-
#commands ⇒ Object
Available commands.
-
#prompt ⇒ Object
Prompt shown before reading a command.
- #repl ⇒ Object
Methods inherited from CommandProcessor
#at_breakpoint, #at_catchpoint, #at_end, #at_line, #at_return, #at_tracing, #command_list, #initialize, #printer, #proceed!, #process_commands
Methods included from Helpers::EvalHelper
#error_eval, #multiple_thread_eval, #separate_thread_eval, #silent_eval, #warning_eval
Constructor Details
This class inherits a constructor from Byebug::CommandProcessor
Instance Method Details
#after_repl ⇒ Object
28 29 30 31 32 |
# File 'lib/byebug/processors/script_processor.rb', line 28 def after_repl super interface.close end |
#commands ⇒ Object
Available commands
13 14 15 |
# File 'lib/byebug/processors/script_processor.rb', line 13 def commands super.select(&:allow_in_control) end |
#prompt ⇒ Object
Prompt shown before reading a command.
37 38 39 |
# File 'lib/byebug/processors/script_processor.rb', line 37 def prompt "(byebug:ctrl) " end |
#repl ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/byebug/processors/script_processor.rb', line 17 def repl while (input = interface.read_command(prompt)) safely do command = command_list.match(input) raise CommandNotFound.new(input) unless command command.new(self, input).execute end end end |