Sha256: aa3379a88e89efc898be335519b28557d776c6b91923cb2e30f332754b4b9d08

Contents?: true

Size: 840 Bytes

Versions: 50

Compression:

Stored size: 840 Bytes

Contents

module Debugger
  # Implements debugger "reload" command.
  class ReloadCommand < Command
    self.allow_in_control = true

    register_setting_get(:reload_source_on_change) do 
      Debugger.reload_source_on_change
    end
    register_setting_set(:reload_source_on_change) do |value|
      Debugger.reload_source_on_change = value
    end
    
    def regexp
      /^\s*r(?:eload)?$/
    end
    
    def execute
      Debugger.source_reload
      print "Source code is reloaded. Automatic reloading is #{source_reloading}.\n"
    end
    
    private
    
    def source_reloading
      Debugger.reload_source_on_change ? 'on' : 'off'
    end
    
    class << self
      def help_command
        'reload'
      end

      def help(cmd)
        %{
          r[eload]\tforces source code reloading
        }
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 11 rubygems

Version Path
ruby-debug-0.11.0 cli/ruby-debug/commands/reload.rb
logstash-output-icinga-1.1.0 vendor/jruby/1.9/gems/ruby-debug-0.10.6/cli/ruby-debug/commands/reload.rb
ruby-debug-0.10.6 cli/ruby-debug/commands/reload.rb
ruby-debug-0.10.5.rc9 cli/ruby-debug/commands/reload.rb
ruby-debug-0.10.5.rc8 cli/ruby-debug/commands/reload.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/reload.rb
ruby-debug-0.10.5.rc7 cli/ruby-debug/commands/reload.rb
ruby-debug-0.10.5.rc5 cli/ruby-debug/commands/reload.rb
ruby-debug-0.10.5.rc4 cli/ruby-debug/commands/reload.rb
debugger2-1.0.0.beta2 lib/ruby-debug/commands/reload.rb
debugger2-1.0.0.beta1 lib/ruby-debug/commands/reload.rb
needy_debugger-1.4.0 lib/ruby-debug/commands/reload.rb
debugger-1.4.0 lib/ruby-debug/commands/reload.rb
debugger-1.3.3 lib/ruby-debug/commands/reload.rb
debugger-1.3.2 lib/ruby-debug/commands/reload.rb
debugger-1.3.1 lib/ruby-debug/commands/reload.rb
debugger-1.3.0 lib/ruby-debug/commands/reload.rb
debugger-1.2.4 lib/ruby-debug/commands/reload.rb
debugger-1.2.3 lib/ruby-debug/commands/reload.rb
ruby-debug-0.10.5.rc3 cli/ruby-debug/commands/reload.rb