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
debugger-1.2.2 lib/ruby-debug/commands/reload.rb
debugger-1.2.1 lib/ruby-debug/commands/reload.rb
debugger-1.2.0 lib/ruby-debug/commands/reload.rb
ruby-debug-0.10.5.rc2 cli/ruby-debug/commands/reload.rb
debugger-1.1.4 lib/ruby-debug/commands/reload.rb
debugger-1.1.3 lib/ruby-debug/commands/reload.rb
debugger-1.1.2 lib/ruby-debug/commands/reload.rb
debugger-1.1.1 lib/ruby-debug/commands/reload.rb
debugger-1.1.0 lib/ruby-debug/commands/reload.rb
debugger-1.0.1 lib/ruby-debug/commands/reload.rb
debugger-1.0.0 cli/ruby-debug/commands/reload.rb
debugger-1.0.0.rc2 cli/ruby-debug/commands/reload.rb
debugger-1.0.0.rc1 cli/ruby-debug/commands/reload.rb
ruby-debug193-0.0.1 cli/ruby-debug/commands/reload.rb
ruby-debug-0.10.5.rc1 cli/ruby-debug/commands/reload.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/commands/reload.rb
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/reload.rb
vim-jar-0.1.2 bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/reload.rb
vim-jar-0.1.1 bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/reload.rb
vim-jar-0.1.0 bundler/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/reload.rb