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
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, #interface, #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
26 27 28 |
# File 'lib/byebug/processors/script_processor.rb', line 26 def after_repl interface.close end |
#commands ⇒ Object
Available commands
11 12 13 |
# File 'lib/byebug/processors/script_processor.rb', line 11 def commands super.select(&:allow_in_control) end |
#prompt ⇒ Object
Prompt shown before reading a command.
33 34 35 |
# File 'lib/byebug/processors/script_processor.rb', line 33 def prompt '(byebug:ctrl) ' end |
#repl ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/byebug/processors/script_processor.rb', line 15 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 |