Class: Byebug::VarAllCommand

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

Overview

Show all 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



71
72
73
74
75
# File 'lib/byebug/commands/variables.rb', line 71

def description
  %(v[ar] a[ll]

    Show local, global and instance & class variables of self.)
end

.namesObject



67
68
69
# File 'lib/byebug/commands/variables.rb', line 67

def names
  %w(var)
end

Instance Method Details

#executeObject



59
60
61
62
63
64
# File 'lib/byebug/commands/variables.rb', line 59

def execute
  var_class_self
  var_global
  var_instance('self')
  var_local
end

#regexpObject



55
56
57
# File 'lib/byebug/commands/variables.rb', line 55

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