Class: Debugger::ShowCommand

### Home Classes Methods

### In Files

- lib/ruby-debug/commands/show.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::ShowCommand

Implements debugger "show" command.

### Constants

Subcommands

### Public Class Methods

help(args) click to toggle source

    # File lib/ruby-debug/commands/show.rb, line 204
    def help(args)
      if args[1]
        s = args[1]
        subcmd = Subcommands.find do |try_subcmd|
          (s.size >= try_subcmd.min) and
            (try_subcmd.name[0..s.size-1] == s)
        end
        if subcmd
          str = subcmd.short_help + '.'
          str += "\n" + subcmd.long_help if subcmd.long_help
          return str
        else
          return "Invalid 'show' subcommand '#{args[1]}'."
        end
      end
      s = "
        Generic command for showing things about the debugger.

        --
        List of show subcommands:
        --
      "
      for subcmd in Subcommands do
        s += "show #{subcmd.name} -- #{subcmd.short_help}\n"
      end
      return s
    end

help_command() click to toggle source

    # File lib/ruby-debug/commands/show.rb, line 200
    def help_command
      "show"
    end

### Public Instance Methods

execute() click to toggle source

    # File lib/ruby-debug/commands/show.rb, line 183
    def execute
      if !@match[1]
        subcommands = Subcommands.map { |s| "show #{s.name} -- #{s.short_help}" }.join("\n")
        print pr("show.errors.no_subcommand", subcommands: subcommands)
      else
        args = @match[1].split(/[ \t]+/)
        param = args.shift
        subcmd = find(Subcommands, param)
        if subcmd
          print show_setting(subcmd.name)
        else
          print pr("show.errors.unknown", name: param)
        end
      end
    end

regexp() click to toggle source

    # File lib/ruby-debug/commands/show.rb, line 179
    def regexp
      /^show (?: \s+ (.+) )?$/i
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.