Class: Byebug::VarGlobalCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/byebug/commands/variables.rb

Overview

Show global variables and its values.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



153
154
155
# File 'lib/byebug/commands/variables.rb', line 153

def description
  %(v[ar] g[lobal]        Show global variables.)
end

.namesObject



149
150
151
# File 'lib/byebug/commands/variables.rb', line 149

def names
  %w(var)
end

Instance Method Details

#executeObject



144
145
146
# File 'lib/byebug/commands/variables.rb', line 144

def execute
  var_global
end

#regexpObject



140
141
142
# File 'lib/byebug/commands/variables.rb', line 140

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