2002-07-09 07:17:17 -04:00
|
|
|
#
|
2009-03-05 22:56:38 -05:00
|
|
|
# change-ws.rb -
|
2009-07-07 07:36:20 -04:00
|
|
|
# $Release Version: 0.9.6$
|
2002-07-09 07:17:17 -04:00
|
|
|
# $Revision$
|
2005-04-13 11:27:09 -04:00
|
|
|
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
|
2002-07-09 07:17:17 -04:00
|
|
|
#
|
|
|
|
# --
|
|
|
|
#
|
2009-03-05 22:56:38 -05:00
|
|
|
#
|
2002-07-09 07:17:17 -04:00
|
|
|
#
|
|
|
|
|
|
|
|
require "irb/cmd/nop.rb"
|
|
|
|
require "irb/ext/workspaces.rb"
|
|
|
|
|
|
|
|
module IRB
|
|
|
|
module ExtendCommand
|
|
|
|
class Workspaces<Nop
|
|
|
|
def execute(*obj)
|
|
|
|
irb_context.workspaces.collect{|ws| ws.main}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class PushWorkspace<Workspaces
|
|
|
|
def execute(*obj)
|
|
|
|
irb_context.push_workspace(*obj)
|
|
|
|
super
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class PopWorkspace<Workspaces
|
|
|
|
def execute(*obj)
|
|
|
|
irb_context.pop_workspace(*obj)
|
|
|
|
super
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|