/tools/Ruby/lib/ruby/1.8/irb/cmd/subirb.rb

http://github.com/agross/netopenspace · Ruby · 43 lines · 26 code · 5 blank · 12 comment · 0 complexity · 43a9198c4cd8005b3e7a8f275e6b0db3 MD5 · raw file

  1. #!/usr/local/bin/ruby
  2. #
  3. # multi.rb -
  4. # $Release Version: 0.9.5$
  5. # $Revision: 11708 $
  6. # $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
  7. # by Keiju ISHITSUKA(keiju@ruby-lang.org)
  8. #
  9. # --
  10. #
  11. #
  12. #
  13. require "irb/cmd/nop.rb"
  14. require "irb/ext/multi-irb"
  15. module IRB
  16. module ExtendCommand
  17. class IrbCommand<Nop
  18. def execute(*obj)
  19. IRB.irb(nil, *obj)
  20. end
  21. end
  22. class Jobs<Nop
  23. def execute
  24. IRB.JobManager
  25. end
  26. end
  27. class Foreground<Nop
  28. def execute(key)
  29. IRB.JobManager.switch(key)
  30. end
  31. end
  32. class Kill<Nop
  33. def execute(*keys)
  34. IRB.JobManager.kill(*keys)
  35. end
  36. end
  37. end
  38. end