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, #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



119
120
121
122
123
# File 'lib/ruby-debug/commands/variables.rb', line 119

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

.help_commandObject



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

def help_command
  'var'
end

Instance Method Details

#executeObject



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

def execute
  var_locals(@state.context.frame_locals(@state.frame_pos))
end

#regexpObject



106
107
108
# File 'lib/ruby-debug/commands/variables.rb', line 106

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