2002-07-09 07:17:17 -04:00
|
|
|
#
|
|
|
|
# change-ws.rb -
|
2005-04-13 11:27:09 -04:00
|
|
|
# $Release Version: 0.9.5$
|
2002-07-09 07:17:17 -04:00
|
|
|
# $Revision$
|
|
|
|
# $Date$
|
2005-04-13 11:27:09 -04:00
|
|
|
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
|
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
|
|
|
|
|