Class: Debugger::VarLocalCommand

### Home Classes Methods

### In Files

- lib/ruby-debug/commands/variables.rb

### Parent

Debugger::Command

### Methods

- ::help
- ::help_command
- #execute
- #regexp

### Class/Module Index

Quicksearch

- Debugger
- Debugger::AddBreakpoint
- Debugger::Breakpoint
- Debugger::Context
- Debugger::ContinueCommand
- Debugger::DeleteBreakpointCommand
- Debugger::FinishCommand
- Debugger::HelpCommand
- Debugger::IRBCommand
- Debugger::InfoCommand
- Debugger::JumpCommand
- Debugger::KillCommand
- Debugger::ListCommand
- Debugger::LocalInterface
- Debugger::LocalInterface::Debugger
- Debugger::MethodCommand
- Debugger::MethodSigCommand
- Debugger::NextCommand
- Debugger::ParseFunctions
- Debugger::Processor
- Debugger::QuitCommand
- Debugger::ReloadCommand
- Debugger::SetCommand
- Debugger::ShowCommand
- Debugger::SkipCommand
- Debugger::SourceCommand
- Debugger::StepCommand
- Debugger::VarClassVarCommand
- Debugger::VarInheritCommand
- Debugger::VarLocalCommand
- Debugger::WhereCommand
- Printers
- Printers::Base
- Printers::Base::MissedArgument
- Printers::Base::MissedPath
- Printers::Plain
- Mocha
- Mocha::Call
- Mocha::Expectation
- Mocha::Mock
- MiniTest
- MiniTest::Assertions
- MiniTest::Expectations
- TestDsl
- TestDsl::ClassMethods
- TestDsl::Shared
- Kernel
- Module
- PrinterHelpers
- TestInterface

No matching classes.

# 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.