Sha256: 6577fd185a50bb72f4beaa62e592e30592eb8643afdb8b078fac26574826a20f

Contents?: true

Size: 866 Bytes

Versions: 13

Compression:

Stored size: 866 Bytes

Contents

module Debugger

  # Implements debugger "quit" command
  class QuitCommand < Command
    self.allow_in_control = true

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

    def execute
      if @match[1] or confirm(pr("quit.confirmations.really"))
        @state.interface.finalize
        exit! # exit -> exit!: No graceful way to stop threads...
      end
    end

    class << self
      def help_command
        %w[quit exit]
      end

      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
    end
  end
end

Version data entries

13 entries across 12 versions & 3 rubygems

Version Path
logstash-output-icinga-1.1.0 vendor/jruby/1.9/gems/debugger-1.6.8/lib/ruby-debug/commands/quit.rb
debugger-1.6.8 lib/ruby-debug/commands/quit.rb
debugger-1.6.7 lib/ruby-debug/commands/quit.rb
debugger-1.6.6 lib/ruby-debug/commands/quit.rb
debugger-1.6.5 lib/ruby-debug/commands/quit.rb
debugger-1.6.4 lib/ruby-debug/commands/quit.rb
debugger-1.6.3 lib/ruby-debug/commands/quit.rb
debugger-1.6.2 lib/ruby-debug/commands/quit.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/debugger-1.6.1/lib/ruby-debug/commands/quit.rb
candlepin-api-0.4.0 bundle/ruby/gems/debugger-1.6.1/lib/ruby-debug/commands/quit.rb
debugger-1.6.1 lib/ruby-debug/commands/quit.rb
debugger-1.6.0 lib/ruby-debug/commands/quit.rb
debugger-1.5.0 lib/ruby-debug/commands/quit.rb