class Byebug::QuitCommand - byebug-9.0.6 Documentation

# class Byebug::QuitCommand

Exit from byebug.

### Public Class Methods

description() click to toggle source

    # File lib/byebug/commands/quit.rb, line 15
    def self.description
      <<-EOD
        q[uit] [!|unconditionally]

        #{short_description}

        Normally we prompt before exiting. However if the parameter
        "unconditionally" is given or command is suffixed with !, we exit
        without asking further questions.
      EOD
    end

regexp() click to toggle source

    # File lib/byebug/commands/quit.rb, line 11
    def self.regexp
      /^\s* q(?:uit)? \s* (?:(!|\s+unconditionally))? \s*$/x
    end

short_description() click to toggle source

    # File lib/byebug/commands/quit.rb, line 27
    def self.short_description
      'Exits byebug'
    end

### Public Instance Methods

execute() click to toggle source

    # File lib/byebug/commands/quit.rb, line 31
    def execute
      return unless @match[1] || confirm(pr('quit.confirmations.really'))

      processor.interface.autosave
      processor.interface.close

      Process.exit!
    end