Line | |
---|
1 | #
|
---|
2 | # change-ws.rb -
|
---|
3 | # $Release Version: 0.9.5$
|
---|
4 | # $Revision: 11708 $
|
---|
5 | # $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
|
---|
6 | # by Keiju ISHITSUKA([email protected])
|
---|
7 | #
|
---|
8 | # --
|
---|
9 | #
|
---|
10 | #
|
---|
11 | #
|
---|
12 |
|
---|
13 | require "irb/cmd/nop.rb"
|
---|
14 | require "irb/ext/workspaces.rb"
|
---|
15 |
|
---|
16 | module IRB
|
---|
17 | module ExtendCommand
|
---|
18 | class Workspaces<Nop
|
---|
19 | def execute(*obj)
|
---|
20 | irb_context.workspaces.collect{|ws| ws.main}
|
---|
21 | end
|
---|
22 | end
|
---|
23 |
|
---|
24 | class PushWorkspace<Workspaces
|
---|
25 | def execute(*obj)
|
---|
26 | irb_context.push_workspace(*obj)
|
---|
27 | super
|
---|
28 | end
|
---|
29 | end
|
---|
30 |
|
---|
31 | class PopWorkspace<Workspaces
|
---|
32 | def execute(*obj)
|
---|
33 | irb_context.pop_workspace(*obj)
|
---|
34 | super
|
---|
35 | end
|
---|
36 | end
|
---|
37 | end
|
---|
38 | end
|
---|
39 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.