Class: Byebug::VarLocalCommand

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

Overview

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



201
202
203
# File 'lib/byebug/commands/variables.rb', line 201

def description
  %(v[ar] l[ocal]        Sow local variables.)
end

.namesObject



197
198
199
# File 'lib/byebug/commands/variables.rb', line 197

def names
  %w(var)
end

Instance Method Details

#executeObject



192
193
194
# File 'lib/byebug/commands/variables.rb', line 192

def execute
  var_local
end

#regexpObject



188
189
190
# File 'lib/byebug/commands/variables.rb', line 188

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