Class: Debugger::VarInstanceCommand
- Inherits:
-
Command
- Object
- Command
- Debugger::VarInstanceCommand
show all
- Defined in:
- lib/ruby-debug/commands/variables.rb
Overview
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
Class Method Details
.help(cmd) ⇒ Object
126
127
128
129
130
|
# File 'lib/ruby-debug/commands/variables.rb', line 126
def help(cmd)
%{
v[ar] i[nstance] <object>\tshow instance variables of object. You may pass object id's hex as well.
}
end
|
.help_command ⇒ Object
122
123
124
|
# File 'lib/ruby-debug/commands/variables.rb', line 122
def help_command
'var'
end
|
Instance Method Details
#execute ⇒ Object
116
117
118
119
|
# File 'lib/ruby-debug/commands/variables.rb', line 116
def execute
obj = get_obj(@match)
var_list(obj.instance_variables, obj.instance_eval{binding()})
end
|
#regexp ⇒ Object
111
112
113
114
|
# File 'lib/ruby-debug/commands/variables.rb', line 111
def regexp
/^\s*v(?:ar)?\s+i(?:ns(?:tance)?)?\s*(?:((?:[\\+-]0x)[\dabcdef]+)|\s|$)/
end
|