Class: Debugger::QuitCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ruby-debug-ide/commands/control.rb

Overview

:nodoc:

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, file_filter_supported?, #find, inherited, #initialize, load_commands, #match, method_missing, options, unescape_incoming

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object


23
24
25
26
27
28
# File 'lib/ruby-debug-ide/commands/control.rb', line 23

def help(cmd)
  %{
    q[uit]\texit from debugger, 
    exit\talias to quit
  }
end

.help_commandObject


19
20
21
# File 'lib/ruby-debug-ide/commands/control.rb', line 19

def help_command
  %w[quit exit]
end

Instance Method Details

#executeObject


9
10
11
12
13
14
15
16
# File 'lib/ruby-debug-ide/commands/control.rb', line 9

def execute
  begin
    @printer.print_msg("finished")
    @printer.print_debug("Exiting debugger.")
  ensure
    exit! # exit -> exit!: No graceful way to stop threads...
  end
end

#regexpObject


5
6
7
# File 'lib/ruby-debug-ide/commands/control.rb', line 5

def regexp
  /^\s*(?:q(?:uit)?|exit)\s*$/
end