class DEBUGGER__::Session
def add_preset_commands name, cmds, kick: true, continue: true
def add_preset_commands name, cmds, kick: true, continue: true cs = cmds.map{|c| c.each_line.map{|line| line = line.strip.gsub(/\A\s*\#.*/, '').strip line unless line.empty? }.compact }.flatten.compact if @preset_command && !@preset_command.commands.empty? @preset_command.commands += cs else @preset_command = PresetCommands.new(cs, name, continue) end ThreadClient.current.on_init name if kick end