class Byebug::ScriptProcessor

Processes commands from a file

Public Instance Methods

after_repl() click to toggle source
Calls superclass method Byebug::CommandProcessor#after_repl
# File lib/byebug/processors/script_processor.rb, line 27
def after_repl
  super

  interface.close
end
commands() click to toggle source

Available commands

Calls superclass method
# File lib/byebug/processors/script_processor.rb, line 12
def commands
  super.select(&:allow_in_control)
end
prompt() click to toggle source

Prompt shown before reading a command.

# File lib/byebug/processors/script_processor.rb, line 36
def prompt
  "(byebug:ctrl) "
end
repl() click to toggle source
# File lib/byebug/processors/script_processor.rb, line 16
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

Private Instance Methods

without_exceptions() { || ... } click to toggle source
# File lib/byebug/processors/script_processor.rb, line 42
def without_exceptions
  yield
rescue StandardError
  nil
end