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
97
98
99
100
101
102
|
# File 'lib/ruby-debug/commands/list.rb', line 97
def help(cmd)
%{
r[eload]\tforces source code reloading
r[eload] on/off\tenales/disables automatic source code reloading
}
end
|
.help_command ⇒ Object
93
94
95
|
# File 'lib/ruby-debug/commands/list.rb', line 93
def help_command
'reload'
end
|
Instance Method Details
#execute ⇒ Object
76
77
78
79
80
81
82
83
84
|
# File 'lib/ruby-debug/commands/list.rb', line 76
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
72
73
74
|
# File 'lib/ruby-debug/commands/list.rb', line 72
def regexp
/^\s*r(?:eload)?(?:\s*(on|off))?$/
end
|