Parent

Debugger::VarLocalCommand

Implements the debugger ‘var local’ command.

Public Class Methods

help(cmd) click to toggle source
# File lib/ruby-debug/commands/variables.rb, line 168
def help(cmd)
  %{
    v[ar] l[ocal]\t\t\tshow local variables
  }
end
help_command() click to toggle source
# File lib/ruby-debug/commands/variables.rb, line 164
def help_command
  'var'
end

Public Instance Methods

execute() click to toggle source
# File lib/ruby-debug/commands/variables.rb, line 155
def execute
  locals = []
  _self = @state.context.frame_self(@state.frame_pos)
  locals << ['self', _self] unless _self.to_s == "main"
  locals += @state.context.frame_locals(@state.frame_pos).sort.map { |key, value| [key, value] }
  print prv(locals, 'instance')
end
regexp() click to toggle source
# File lib/ruby-debug/commands/variables.rb, line 151
def regexp
  /^\s*v(?:ar)?\s+l(?:ocal)?\s*$/
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.