Class: Debugger::ReloadCommand
Overview
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, inherited, #initialize, load_commands, #match, method_missing, options
Class Method Details
.help(cmd) ⇒ Object
105
106
107
108
109
110
|
# File 'lib/ruby-debug/commands/list.rb', line 105
def help(cmd)
%{
r[eload]\tforces source code reloading
r[eload] on/off\tenales/disables automatic source code reloading
}
end
|
.help_command ⇒ Object
101
102
103
|
# File 'lib/ruby-debug/commands/list.rb', line 101
def help_command
'reload'
end
|
Instance Method Details
#execute ⇒ Object
84
85
86
87
88
89
90
91
92
|
# File 'lib/ruby-debug/commands/list.rb', line 84
def execute
if @match[1]
Debugger.reload_source_on_change = (@match[1] == 'on')
print "Automatic reloading is #{source_reloading}.\n"
else
Debugger.source_reload
print "Source code is reloaded. Automatic reloading is #{source_reloading}.\n"
end
end
|
#regexp ⇒ Object
80
81
82
|
# File 'lib/ruby-debug/commands/list.rb', line 80
def regexp
/^\s*r(?:eload)?(?:\s*(on|off))?$/
end
|