Class: Debugger::VarConstantCommand
Overview
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
#var_consts, #var_list
Methods inherited from Command
commands, inherited, #initialize, load_commands, #match, method_missing, options
Class Method Details
.help(cmd) ⇒ Object
40
41
42
43
44
|
# File 'lib/ruby-debug/commands/variables.rb', line 40
def help(cmd)
%{
v[ar] c[onst] <object>\t\tshow constants of object
}
end
|
.help_command ⇒ Object
36
37
38
|
# File 'lib/ruby-debug/commands/variables.rb', line 36
def help_command
'var'
end
|
Instance Method Details
#execute ⇒ Object
26
27
28
29
30
31
32
33
|
# File 'lib/ruby-debug/commands/variables.rb', line 26
def execute
obj = debug_eval(@match.post_match)
unless obj.kind_of? Module
print "Should be Class/Module: %s\n", @match.post_match
else
var_consts(obj)
end
end
|
#regexp ⇒ Object
22
23
24
|
# File 'lib/ruby-debug/commands/variables.rb', line 22
def regexp
/^\s*v(?:ar)?\s+c(?:onst(?:ant)?)?\s+/
end
|