class Byebug::ScriptProcessor

Processes commands from a file

Public Instance Methods

commands() click to toggle source

Available commands

Calls superclass method
# File lib/byebug/processors/script_processor.rb, line 11
def commands
  super.select(&:allow_in_control)
end
process_commands() click to toggle source
# File lib/byebug/processors/script_processor.rb, line 15
def process_commands
  while (input = interface.read_command(prompt))
    command = command_list.match(input)

    if command
      command.new(self, input).execute
    else
      errmsg('Unknown command')
    end
  end

  interface.close
rescue IOError, SystemCallError
  interface.close
rescue
  without_exceptions do
    puts "INTERNAL ERROR!!! #{$ERROR_INFO}"
    puts $ERROR_INFO.backtrace.map { |l| "  #{l}" }.join("\n")
  end
end
prompt() click to toggle source

Prompt shown before reading a command.

# File lib/byebug/processors/script_processor.rb, line 39
def prompt
  '(byebug:ctrl) '
end

Private Instance Methods

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