Method: Shell#run

Defined in:
ext/ae-shell/ae-shell.rb

#run(_filename = nil) ⇒ Object



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'ext/ae-shell/ae-shell.rb', line 113

def run(_filename=nil)
  if _filename
    begin
      @arcadia['pers']['run.file.last']=_filename
      @run_threads << Thread.new do
        _cmd_ = "|"+$arcadia['conf']['shell.ruby']+" "+_filename+" 2>&1"
        #  Arcadia.new_debug_msg(self, _cmd_)
        @cmd = open(_cmd_,"r"){|f|
            Arcadia.new_debug_msg(self, f.read)
        }
      end
    rescue Exception => e
      Arcadia.new_debug_msg(self, e)
    end
  end
end