Parent

Files

Debugger::QuitCommand

Implements debugger “quit” command

Public Class Methods

help(cmd) click to toggle source

Returns a String given the help description of this command

# File cli/ruby-debug/commands/quit.rb, line 32
 def help(cmd)
   %{
     q[uit] [!|unconditionally]\texit from debugger. 
     exit[!]\talias to quit

     Normally we prompt before exiting. However if the parameter
     "unconditionally" or is given or suffixed with !, we stop
     without asking further questions.  
    }
end
help_command() click to toggle source

The command name listed via ‘help’

# File cli/ruby-debug/commands/quit.rb, line 27
def help_command
  ]quit exit]
end

Public Instance Methods

execute() click to toggle source

The code that implements this command.

# File cli/ruby-debug/commands/quit.rb, line 18
def execute
  if @match[1] or confirm("Really quit? (y/n) ") 
    @state.interface.finalize
    exit! # exit -> exit!: No graceful way to stop threads...
  end
end
regexp() click to toggle source

An input line is matched against this regular expression. If we have a match, run this command.

# File cli/ruby-debug/commands/quit.rb, line 9
def regexp
  / ^\s*
     (?:q(?:uit)?|exit) \s*
     (!|\s+unconditionally)? \s*
     $
  /x
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.