Sha256: 16502bd40c0ce4a073534c28f5b6805e9a8ed93b593eaa24575d1d9c9d90b298
Contents?: true
Size: 900 Bytes
Versions: 4
Compression:
Stored size: 900 Bytes
Contents
module Byebug # # Processes commands from a file # class ScriptProcessor < CommandProcessor # # Available commands # def commands super.select(&:allow_in_control) end def process_commands while (input = interface.read_command(prompt)) command = command_list.match(input) if command command.new(self).execute else errmsg('Unknown command') end end interface.close rescue IOError, SystemCallError interface.close rescue without_exceptions do puts "INTERNAL ERROR!!! #{$ERROR_INFO}" puts $ERROR_INFO.backtrace.map { |l| " #{l}" }.join("\n") end end # # Prompt shown before reading a command. # def prompt '(byebug:ctrl) ' end private def without_exceptions yield rescue nil end end end
Version data entries
4 entries across 4 versions & 1 rubygems