Class: Debugger::VarLocalCommand

Inherits:
Command
  • Object
show all
Includes:
VarFunctions
Defined in:
lib/ruby-debug/commands/variables.rb

Overview

:nodoc:

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods included from VarFunctions

#var_consts, #var_list

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



113
114
115
116
117
# File 'lib/ruby-debug/commands/variables.rb', line 113

def help(cmd)
  %{
    v[ar] l[ocal]\t\t\tshow local variables
  }
end

.help_commandObject



109
110
111
# File 'lib/ruby-debug/commands/variables.rb', line 109

def help_command
  'var'
end

Instance Method Details

#executeObject



104
105
106
# File 'lib/ruby-debug/commands/variables.rb', line 104

def execute
  var_list(debug_eval("local_variables"))
end

#regexpObject



100
101
102
# File 'lib/ruby-debug/commands/variables.rb', line 100

def regexp
  /^\s*v(?:ar)?\s+l(?:ocal)?\s*$/
end