Class Debugger::VarLocalCommand
In: cli/ruby-debug/commands/variables.rb
Parent: Command

Implements the debugger ‘var local’ command.

Methods

execute   help   help_command   regexp  

Public Class methods

[Source]

     # File cli/ruby-debug/commands/variables.rb, line 151
151:       def help(cmd)
152:         %{
153:           v[ar] l[ocal]\t\t\tshow local variables
154:         }
155:       end

[Source]

     # File cli/ruby-debug/commands/variables.rb, line 147
147:       def help_command
148:         'var'
149:       end

Public Instance methods

[Source]

     # File cli/ruby-debug/commands/variables.rb, line 138
138:     def execute
139:       locals = @state.context.frame_locals(@state.frame_pos)
140:       _self = @state.context.frame_self(@state.frame_pos) 
141:       locals.keys.sort.each do |name|
142:         print "  %s => %p\n", name, locals[name]
143:       end
144:     end

[Source]

     # File cli/ruby-debug/commands/variables.rb, line 134
134:     def regexp
135:       /^\s*v(?:ar)?\s+l(?:ocal)?\s*$/
136:     end

[Validate]