class Byebug::EnableCommand
def description
def description %{ Enable some things. This is used to cancel the effect of the "disable" command. } end
def enable_breakpoints(args)
def enable_breakpoints(args) enable_disable_breakpoints('Enable', args) end
def enable_display(args)
def enable_display(args) enable_disable_display('Enable', args) end
def execute
def execute if not @match[1] errmsg "\"enable\" must be followed by \"display\", \"breakpoints\" " \ "or breakpoint numbers.\n" else args = @match[1].split(/[ \t]+/) param = args.shift subcmd = find(Subcommands, param) if subcmd send("enable_#{subcmd.name}", args) else send('enable_breakpoints', args.unshift(param)) end end end
def help
def help if args[1] subcmd = find(Subcommands, args[1]) return "Invalid \"enable\" subcommand \"#{args[1]}\"." unless subcmd str = subcmd.short_help + '.' str += '\n' + subcmd.long_help if subcmd.long_help return str end EnableCommand.description + format_subcmds(Subcommands) end
def names
def names %w(enable) end
def regexp
def regexp /^\s* en(?:able)? (?:\s+(.*))?$/ix end