Class: Shell
- Inherits:
-
ArcadiaExt
- Object
- ArcadiaExt
- Shell
- Defined in:
- ext/ae-shell/ae-shell.rb
Instance Method Summary collapse
- #build ⇒ Object
- #run(_filename = nil) ⇒ Object
- #run_current ⇒ Object
- #run_last ⇒ Object
- #stop ⇒ Object
Instance Method Details
#build ⇒ Object
11 12 13 |
# File 'ext/ae-shell/ae-shell.rb', line 11 def build @run_threads = Array.new end |
#run(_filename = nil) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'ext/ae-shell/ae-shell.rb', line 33 def run(_filename=nil) if _filename begin $arcadia['pers']['run.file.last']=_filename @run_threads << Thread.new{ _cmd_ = "|"+$arcadia['conf']['shell.ruby']+" "+_filename+" 2>&1" #MsgContract.instance.out_debug(self, _cmd_) @cmd = open(_cmd_,"r"){ |f| MsgContract.instance.out_debug(self, f.read) } } rescue Exception => e MsgContract.instance.out_debug(self, e) end end end |
#run_current ⇒ Object
19 20 21 22 |
# File 'ext/ae-shell/ae-shell.rb', line 19 def run_current current_editor = $arcadia['editor'].raised run(current_editor.file) if current_editor end |
#run_last ⇒ Object
15 16 17 |
# File 'ext/ae-shell/ae-shell.rb', line 15 def run_last run($arcadia['pers']['run.file.last']) end |
#stop ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'ext/ae-shell/ae-shell.rb', line 24 def stop @run_threads.each{|t| if t.alive? t.kill end } debug_quit if @adw end |