Class: Debugger::VarConstantCommand
- Includes:
- VarFunctions
- Defined in:
- lib/ruby-debug/commands/variables.rb
Overview
:nodoc:
Constant Summary
Constants inherited from Command
Class Method Summary collapse
Instance Method Summary collapse
Methods included from VarFunctions
#var_consts, #var_list, #var_locals
Methods inherited from Command
commands, inherited, #initialize, load_commands, #match, method_missing, options
Constructor Details
This class inherits a constructor from Debugger::Command
Class Method Details
.help(cmd) ⇒ Object
46 47 48 49 50 |
# File 'lib/ruby-debug/commands/variables.rb', line 46 def help(cmd) %{ v[ar] c[onst] <object>\t\tshow constants of object } end |
.help_command ⇒ Object
42 43 44 |
# File 'lib/ruby-debug/commands/variables.rb', line 42 def help_command 'var' end |
Instance Method Details
#execute ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/ruby-debug/commands/variables.rb', line 32 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
28 29 30 |
# File 'lib/ruby-debug/commands/variables.rb', line 28 def regexp /^\s*v(?:ar)?\s+c(?:onst(?:ant)?)?\s+/ end |