1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
irb��Ϣ���ޤ����ޥ�ɤȥ饤�֥��
$Release Version: 0.7.1 $
$Revision$
by Keiju ISHITSUKA(Nihon Rational Co.,Ltd.)
=begin
:���ޥ��:
* rtags -- ruby tags command
:�ؿ��饤�֥��:
* xmp -- irb version of gotoken xmp-function
:���饹�饤�֥��:
* frame.rb -- frame tracer
* completion.rb -- irb completor
= rtags
rtags��emacs�ڤ�vi�Ѥ�, TAG�ե������Ĥ��륳�ޥ�ɤǤ�.
== �Ȥ���
rtags [-vi] file....
�����ȥǥ��쥯�ȥ��emacs�Ѥ�TAGS�ե����뤬�Ǥ��ޤ�. -vi���ץ�����
�Ĥ������ˤ�vi�Ѥ�tags�ե������������ޤ�.
emacs�ξ��, �̾��etags.el�����ΤޤȤ��ޤ�. ������ǽ�ʤΤ�,
* ���饹
* ��å�
* �ðۥ�å�
* alias
* attr��������줿��������(�ѥ���������ܥ뤫ʸ�����ƥ��˸¤�)
* attr_XXX��������줿��������(�ѥ���������ܥ뤫ʸ�����ƥ��˸¤�)
�Ǥ�.
C�ʤɤǻȤäƤ���ΤȰ㤦�Τ�, ����ץ�����˴ؤ�����ʬ��,
�ؿ�̾��,
�ؿ�̾(
���饹��,
::���饹̾::....::���饹̾
��åɤ�,
::���饹̾::....::���饹̾#��å�̾
�ðۥ�å�(���饹��å�)��
::���饹̾::....::���饹̾.��å�̾
�ǥ���ץ������Ԥʤ��Ȥ����Ǥ�.
= xmp.rb
���Ȥ���xmp�ξ�̸ߴ��С������Ǥ�. ����, ���˽Ť��ΤǤ��Ȥ���xmp��
���б��Ǥ��ʤ�����, ���Ѥ�����ɤ��Ǥ��礦.
== �Ȥ���
=== �ؿ��Ȥ��ƻȤ�.
require "irb/xmp"
xmp <<END
foo = 1
foo
END
---
foo = 1
==>1
foo
==>1
=== XMP�������Ѥ���.
���ξ���, XMP������ƥ����Ⱦ������ĤΤ�, �ѿ����ͤʤɤ��ݻ����Ƥ�
�ޤ�.
require "irb/xmp"
xmp = XMP.new
xmp.puts <<END
foo = 1
foo
END
xmp.puts <<END
foo
END
===
foo = 1
==>1
foo
==>1
foo
==>1
== ����ƥ����Ȥ˴ؤ���
XMP��åɷ��Υ���ƥ����Ȥ�, �ƤӽФ����Υ���ƥ����Ȥ�ɾ������ޤ�.
����Ū�˥���ƥ����Ȥ���ꤹ��Ȥ��Υ���ƥ����Ȥ�ɾ�����ޤ�.
��:
xmp "foo", an_binding
:��:
�ޥ������åɤˤ��б����Ƥ��ޤ���.
= frame.rb
���¹���Υե졼�������갷������Υ��饹�Ǥ�.
* IRB::Frame.top(n = 0)
�夫��n���ܤΥ���ƥ����Ȥ���Ф��ޤ�. n��0���Ǿ�̤ˤʤ�ޤ�.
* IRB::Frame.bottom(n = 0)
������n���ܤΥ���ƥ����Ȥ���Ф��ޤ�. n��0���Dz��̤ˤʤ�ޤ�.
* IRB::Frame.sender
������ˤʤäƤ��륪�֥������Ȥ���Ф��ޤ�. ������Ȥ�, ���Υ��
�ɤ�ƤӽФ���¦��self�Τ��ȤǤ�.
:��:
set_trace_func���Ѥ���Ruby�μ¹Ԥ�ȥ졼�����Ƥ��ޤ�. �ޥ������åɤ�
���б����Ƥ��ޤ���.
= completion.rb
irb��completion��ǽ�������ΤǤ�.
== �Ȥ���
% irb -r irb/completion
�Ȥ��뤫, ~/.irbrc ���
require "irb/completion"
������Ƥ�������. irb�¹���� require "irb/completion" ���Ƥ�褤�Ǥ�.
irb�¹���� (TAB) ���ȥ���ץ졼����ޤ�.
�ȥåץ�٥��(TAB)���Ȥ��٤Ƥι�ʸ����, ���饹, ��åɤθ��䤬��
�ޤ�. ���䤬ͣ��ʤ�д������䴰���ޤ�.
irb(main):001:0> in
in inspect instance_eval
include install_alias_method instance_of?
initialize install_aliases instance_variables
irb(main):001:0> inspect
"main"
irb(main):002:0> foo = Object.new
#<Object:0x4027146c>
((|�ѿ�̾.|))�θ��(TAB)����, ���Υ��֥������ȤΥ�åɰ������Ǥ�
��.
irb(main):003:0> foo.
foo.== foo.frozen? foo.protected_methods
foo.=== foo.hash foo.public_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect foo.send
foo.__send__ foo.instance_eval foo.singleton_methods
foo.class foo.instance_of? foo.taint
foo.clone foo.instance_variables foo.tainted?
foo.display foo.is_a? foo.to_a
foo.dup foo.kind_of? foo.to_s
foo.eql? foo.method foo.type
foo.equal? foo.methods foo.untaint
foo.extend foo.nil?
foo.freeze foo.private_methods
=end
% Begin Emacs Environment
% Local Variables:
% mode: text
% comment-column: 0
% comment-start: "%"
% comment-end: "\n"
% End:
%
|