Class: Debugger::VarInstanceCommand
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
89
90
91
92
93
|
# File 'lib/ruby-debug/commands/variables.rb', line 89
def help(cmd)
%{
v[ar] i[nstance] <object>\tshow instance variables of object
}
end
|
.help_command ⇒ Object
85
86
87
|
# File 'lib/ruby-debug/commands/variables.rb', line 85
def help_command
'var'
end
|
Instance Method Details
#execute ⇒ Object
79
80
81
82
|
# File 'lib/ruby-debug/commands/variables.rb', line 79
def execute
obj = debug_eval(@match.post_match)
var_list(obj.instance_variables, obj.instance_eval{binding()})
end
|
#regexp ⇒ Object
75
76
77
|
# File 'lib/ruby-debug/commands/variables.rb', line 75
def regexp
/^\s*v(?:ar)?\s+i(?:nstance)?\s+/
end
|