Sha256: 6332b0f8a4a0b677f634b7180ca54e044f96d8930583291fe14839aec0c30a88
Contents?: true
Size: 864 Bytes
Versions: 6
Compression:
Stored size: 864 Bytes
Contents
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 def regexp /^\s* so(?:urce)? (?:\s+(\S+))? \s*$/x end def execute return puts(self.class.help) if self.class.names.include?(@match[0]) file = File.expand_path(@match[1]).strip return errmsg("File \"#{file}\" not found") unless File.exist?(file) if @state && @state.interface @state.interface.command_queue += File.open(file).readlines else Byebug.run_script(file, @state) end end class << self def names %w(source) end def description %(source <file> Executes file <file> containing byebug commands.) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems