class Byebug::SourceCommand
It can be used to restore a previously saved debugging session.
Execute a file containing byebug commands.
def description
def description prettify <<-EOD source <file> Executes file <file> containing byebug commands. EOD end
def execute
def execute return puts(self.class.help) if self.class.names.include?(@match[0]) unless @state && @state.interface return errmsg(pr('source.errors.not_available')) end file = File.expand_path(@match[1]).strip unless File.exist?(file) return errmsg(pr('source.errors.not_found', file: file)) end @state.interface.read_file(file) end
def names
def names %w(source) end
def regexp
def regexp /^\s* so(?:urce)? (?:\s+(\S+))? \s*$/x end