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 14 |
# File 'ext/ae-shell/ae-shell.rb', line 11 def build #@ae_msg_contract = @arcadia.retrieve_contract(self, MsgContract) @run_threads = Array.new end |
#run(_filename = nil) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'ext/ae-shell/ae-shell.rb', line 35 def run(_filename=nil) if _filename begin $arcadia['pers']['run.file.last']=_filename @run_threads << Thread.new{ @cmd = open("|"+$arcadia['conf']['shell.ruby']+" "+_filename+" 2>&1","r"){ |f| MsgContract.instance.out_debug(self, f.read) #@ae_msg_contract.out_debug(f.read) } } rescue Exception => e MsgContract.instance.out_debug(self, e) #@ae_msg_contract.out_debug(e) #@main_frame.text.insert('end', "---> "+e ) end end end |
#run_current ⇒ Object
20 21 22 23 |
# File 'ext/ae-shell/ae-shell.rb', line 20 def run_current current_editor = $arcadia['editor'].raised run(current_editor.file) if current_editor end |
#run_last ⇒ Object
16 17 18 |
# File 'ext/ae-shell/ae-shell.rb', line 16 def run_last run($arcadia['pers']['run.file.last']) end |
#stop ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'ext/ae-shell/ae-shell.rb', line 25 def stop @run_threads.each{|t| if t.alive? t.kill end } debug_quit if @adw end |