Class: Debugger::VarInheritCommand
- Inherits:
-
Command
- Object
- Command
- Debugger::VarInheritCommand
show all
- Defined in:
- lib/ruby-debug/commands/variables.rb
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
191
192
193
194
195
|
# File 'lib/ruby-debug/commands/variables.rb', line 191
def help(cmd)
%{
v[ar] ct\t\t\tshow class heirarchy of object
}
end
|
.help_command ⇒ Object
187
188
189
|
# File 'lib/ruby-debug/commands/variables.rb', line 187
def help_command
'var'
end
|
Instance Method Details
#execute ⇒ Object
172
173
174
175
176
177
178
179
180
181
182
183
184
|
# File 'lib/ruby-debug/commands/variables.rb', line 172
def execute
unless @state.context
errmsg "can't get object inheritance.\n"
return
end
puts @match.post_match
obj = debug_eval("#{@match.post_match}.classtree")
if obj
print obj
else
errmsg "Trouble getting object #{@match.post_match}\n"
end
end
|
#regexp ⇒ Object
168
169
170
|
# File 'lib/ruby-debug/commands/variables.rb', line 168
def regexp
/^\s*v(?:ar)?\s+ct\s*/
end
|