Class: Debugger::VarGlobalCommand

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_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



57
58
59
60
61
# File 'lib/ruby-debug/commands/variables.rb', line 57

def help(cmd)
  %{
    v[ar] g[lobal]\t\t\tshow global variables
  }
end

.help_commandObject



53
54
55
# File 'lib/ruby-debug/commands/variables.rb', line 53

def help_command
  'var'
end

Instance Method Details

#executeObject



48
49
50
# File 'lib/ruby-debug/commands/variables.rb', line 48

def execute
  var_list(global_variables)
end

#regexpObject



44
45
46
# File 'lib/ruby-debug/commands/variables.rb', line 44

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