Class: Debugger::ReloadCommand

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

Overview

Implements debugger “reload” command.

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, #find, inherited, #initialize, load_commands, #match, method_missing, options, register_setting_get, register_setting_set, register_setting_var, settings, settings_map

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



33
34
35
36
37
# File 'lib/ruby-debug/commands/reload.rb', line 33

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

.help_commandObject



29
30
31
# File 'lib/ruby-debug/commands/reload.rb', line 29

def help_command
  'reload'
end

Instance Method Details

#executeObject



17
18
19
20
# File 'lib/ruby-debug/commands/reload.rb', line 17

def execute
  Debugger.source_reload
  print pr("reload.messages.done", source_reloading: source_reloading)
end

#regexpObject



13
14
15
# File 'lib/ruby-debug/commands/reload.rb', line 13

def regexp
  /^\s*r(?:eload)?$/
end