Command
Implements debugger “show” command.
# File cli/ruby-debug/commands/show.rb, line 202 def execute if not @match[1] print "\"show\" must be followed by the name of an show command:\n" print "List of show subcommands:\n\n" for subcmd in Subcommands do print "show #{subcmd.name} -- #{subcmd.short_help}\n" unless 'forcestep' == subcmd.name end else args = @match[1].split(/[ \t]+/) param = args.shift subcmd = find(Subcommands, param) if subcmd print "%s\n" % show_setting(subcmd.name) else print "Unknown show command #{param}\n" end end end
# File cli/ruby-debug/commands/show.rb, line 227 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
Generated with the Darkfish Rdoc Generator 2.