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



70
71
72
73
74
# File 'lib/ruby-debug/commands/variables.rb', line 70

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

.help_commandObject



66
67
68
# File 'lib/ruby-debug/commands/variables.rb', line 66

def help_command
  'var'
end

Instance Method Details

#executeObject



61
62
63
# File 'lib/ruby-debug/commands/variables.rb', line 61

def execute
  var_list(global_variables)
end

#regexpObject



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

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