Sha256: 0ac1a7bbd2029b97d558669d390cb5e67bb297e62c9c0e1cc1de0505cd550479
Contents?: true
Size: 845 Bytes
Versions: 6
Compression:
Stored size: 845 Bytes
Contents
# frozen_string_literal: true require "byebug/command" module Byebug # # Execute a file containing byebug commands. # # It can be used to restore a previously saved debugging session. # class SourceCommand < Command self.allow_in_control = true self.allow_in_post_mortem = true def self.regexp /^\s* so(?:urce)? (?:\s+(\S+))? \s*$/x end def self.description <<-DESCRIPTION source <file> #{short_description} DESCRIPTION end def self.short_description "Restores a previously saved byebug session" end def execute return puts(help) unless @match[1] file = File.expand_path(@match[1]).strip return errmsg(pr("source.errors.not_found", file: file)) unless File.exist?(file) processor.interface.read_file(file) end end end
Version data entries
6 entries across 6 versions & 4 rubygems