Class: Debugger::VarLocalCommand

Inherits:
Command
  • Object
show all
Includes:
VarFunctions
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 included from VarFunctions

#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



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

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

.help_commandObject



102
103
104
# File 'lib/ruby-debug/commands/variables.rb', line 102

def help_command
  'var'
end

Instance Method Details

#executeObject



97
98
99
# File 'lib/ruby-debug/commands/variables.rb', line 97

def execute
  var_list(eval("local_variables", @state.binding))
end

#regexpObject



93
94
95
# File 'lib/ruby-debug/commands/variables.rb', line 93

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