irbtools 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,602 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>File: irbtools.rb</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="fileHeader">
50
- <h1>irbtools.rb</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>lib/irbtools.rb
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Wed Oct 06 23:45:19 +0200 2010</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
- <div id="description">
72
- <p>
73
- encoding: utf-8
74
- </p>
75
-
76
- </div>
77
-
78
- <div id="requires-list">
79
- <h3 class="section-bar">Required files</h3>
80
-
81
- <div class="name-list">
82
- ruby-debug&nbsp;&nbsp;
83
- </div>
84
- </div>
85
-
86
- </div>
87
-
88
- <div id="method-list">
89
- <h3 class="section-bar">Methods</h3>
90
-
91
- <div class="name-list">
92
- <a href="#M000012">cat</a>&nbsp;&nbsp;
93
- <a href="#M000011">cd</a>&nbsp;&nbsp;
94
- <a href="#M000007">colorize</a>&nbsp;&nbsp;
95
- <a href="#M000001">copy</a>&nbsp;&nbsp;
96
- <a href="#M000003">copy_input</a>&nbsp;&nbsp;
97
- <a href="#M000005">copy_output</a>&nbsp;&nbsp;
98
- <a href="#M000004">copy_session_input</a>&nbsp;&nbsp;
99
- <a href="#M000006">copy_session_output</a>&nbsp;&nbsp;
100
- <a href="#M000018">debuger</a>&nbsp;&nbsp;
101
- <a href="#M000010">dir</a>&nbsp;&nbsp;
102
- <a href="#M000009">ls</a>&nbsp;&nbsp;
103
- <a href="#M000002">paste</a>&nbsp;&nbsp;
104
- <a href="#M000008">ray</a>&nbsp;&nbsp;
105
- <a href="#M000015">reset!</a>&nbsp;&nbsp;
106
- <a href="#M000013">rq</a>&nbsp;&nbsp;
107
- <a href="#M000016">ruby_version</a>&nbsp;&nbsp;
108
- <a href="#M000014">session_history</a>&nbsp;&nbsp;
109
- <a href="#M000017">use</a>&nbsp;&nbsp;
110
- </div>
111
- </div>
112
-
113
- </div>
114
-
115
-
116
- <!-- if includes -->
117
- <div id="includes">
118
- <h3 class="section-bar">Included Modules</h3>
119
-
120
- <div id="includes-list">
121
- <span class="include-name">FileUtils::Verbose</span>
122
- </div>
123
- </div>
124
-
125
- <div id="section">
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
- <!-- if method_list -->
135
- <div id="methods">
136
- <h3 class="section-bar">Public Instance methods</h3>
137
-
138
- <div id="method-M000012" class="method-detail">
139
- <a name="M000012"></a>
140
-
141
- <div class="method-heading">
142
- <a href="#M000012" class="method-signature">
143
- <span class="method-name">cat</span><span class="method-args">(path)</span>
144
- </a>
145
- </div>
146
-
147
- <div class="method-description">
148
- <p>
149
- read file contents (also see <a href="irbtools_rb.html#M000008">ray</a> for
150
- ruby source files ;) )
151
- </p>
152
- <p><a class="source-toggle" href="#"
153
- onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
154
- <div class="method-source-code" id="M000012-source">
155
- <pre>
156
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 91</span>
157
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cat</span>(<span class="ruby-identifier">path</span>)
158
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span> <span class="ruby-identifier">path</span>
159
- <span class="ruby-keyword kw">end</span>
160
- </pre>
161
- </div>
162
- </div>
163
- </div>
164
-
165
- <div id="method-M000011" class="method-detail">
166
- <a name="M000011"></a>
167
-
168
- <div class="method-heading">
169
- <a href="#M000011" class="method-signature">
170
- <span class="method-name">cd</span><span class="method-args">(path = '/', *args)</span>
171
- </a>
172
- </div>
173
-
174
- <div class="method-description">
175
- <p>
176
- patch <a href="irbtools_rb.html#M000011">cd</a> so that it also shows the
177
- current directory
178
- </p>
179
- <p><a class="source-toggle" href="#"
180
- onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
181
- <div class="method-source-code" id="M000011-source">
182
- <pre>
183
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 85</span>
184
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cd</span>(<span class="ruby-identifier">path</span> = <span class="ruby-value str">'/'</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
185
- <span class="ruby-constant">FileUtils</span><span class="ruby-operator">::</span><span class="ruby-constant">Verbose</span>.<span class="ruby-identifier">cd</span> <span class="ruby-identifier">path</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
186
- <span class="ruby-identifier">ls</span>
187
- <span class="ruby-keyword kw">end</span>
188
- </pre>
189
- </div>
190
- </div>
191
- </div>
192
-
193
- <div id="method-M000007" class="method-detail">
194
- <a name="M000007"></a>
195
-
196
- <div class="method-heading">
197
- <a href="#M000007" class="method-signature">
198
- <span class="method-name">colorize</span><span class="method-args">(string)</span>
199
- </a>
200
- </div>
201
-
202
- <div class="method-description">
203
- <p>
204
- syntax highlight a string
205
- </p>
206
- <p><a class="source-toggle" href="#"
207
- onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
208
- <div class="method-source-code" id="M000007-source">
209
- <pre>
210
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 54</span>
211
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">colorize</span>(<span class="ruby-identifier">string</span>)
212
- <span class="ruby-identifier">puts</span> <span class="ruby-constant">CodeRay</span>.<span class="ruby-identifier">scan</span>( <span class="ruby-identifier">string</span>, <span class="ruby-identifier">:ruby</span> ).<span class="ruby-identifier">term</span>
213
- <span class="ruby-keyword kw">end</span>
214
- </pre>
215
- </div>
216
- </div>
217
- </div>
218
-
219
- <div id="method-M000001" class="method-detail">
220
- <a name="M000001"></a>
221
-
222
- <div class="method-heading">
223
- <a href="#M000001" class="method-signature">
224
- <span class="method-name">copy</span><span class="method-args">(str)</span>
225
- </a>
226
- </div>
227
-
228
- <div class="method-description">
229
- <p>
230
- copies the clipboard
231
- </p>
232
- <p><a class="source-toggle" href="#"
233
- onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
234
- <div class="method-source-code" id="M000001-source">
235
- <pre>
236
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 28</span>
237
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">copy</span>(<span class="ruby-identifier">str</span>)
238
- <span class="ruby-constant">Clipboard</span>.<span class="ruby-identifier">copy</span>(<span class="ruby-identifier">str</span>)
239
- <span class="ruby-keyword kw">end</span>
240
- </pre>
241
- </div>
242
- </div>
243
- </div>
244
-
245
- <div id="method-M000003" class="method-detail">
246
- <a name="M000003"></a>
247
-
248
- <div class="method-heading">
249
- <a href="#M000003" class="method-signature">
250
- <span class="method-name">copy_input</span><span class="method-args">()</span>
251
- </a>
252
- </div>
253
-
254
- <div class="method-description">
255
- <p>
256
- copies everything you have entered in this irb session
257
- </p>
258
- <p><a class="source-toggle" href="#"
259
- onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
260
- <div class="method-source-code" id="M000003-source">
261
- <pre>
262
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 38</span>
263
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">copy_input</span>
264
- <span class="ruby-identifier">copy</span> <span class="ruby-identifier">session_history</span>
265
- <span class="ruby-value str">&quot;The session input history has been copied to the clipboard.&quot;</span>
266
- <span class="ruby-keyword kw">end</span>
267
- </pre>
268
- </div>
269
- </div>
270
- </div>
271
-
272
- <div id="method-M000005" class="method-detail">
273
- <a name="M000005"></a>
274
-
275
- <div class="method-heading">
276
- <a href="#M000005" class="method-signature">
277
- <span class="method-name">copy_output</span><span class="method-args">()</span>
278
- </a>
279
- </div>
280
-
281
- <div class="method-description">
282
- <p>
283
- copies the output of all irb commands in this irb session
284
- </p>
285
- <p><a class="source-toggle" href="#"
286
- onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
287
- <div class="method-source-code" id="M000005-source">
288
- <pre>
289
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 45</span>
290
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">copy_output</span>
291
- <span class="ruby-identifier">copy</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">:@eval_history_values</span>).<span class="ruby-identifier">inspect</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/^\d+ (.*)/</span>, <span class="ruby-value str">'\1'</span>)
292
- <span class="ruby-value str">&quot;The session output history has been copied to the clipboard.&quot;</span>
293
- <span class="ruby-keyword kw">end</span>
294
- </pre>
295
- </div>
296
- </div>
297
- </div>
298
-
299
- <div id="method-M000004" class="method-detail">
300
- <a name="M000004"></a>
301
-
302
- <div class="method-heading">
303
- <span class="method-name">copy_session_input</span><span class="method-args">()</span>
304
- </div>
305
-
306
- <div class="method-description">
307
- <p>
308
- Alias for <a href="irbtools_rb.html#M000003">copy_input</a>
309
- </p>
310
- </div>
311
- </div>
312
-
313
- <div id="method-M000006" class="method-detail">
314
- <a name="M000006"></a>
315
-
316
- <div class="method-heading">
317
- <span class="method-name">copy_session_output</span><span class="method-args">()</span>
318
- </div>
319
-
320
- <div class="method-description">
321
- <p>
322
- Alias for <a href="irbtools_rb.html#M000005">copy_output</a>
323
- </p>
324
- </div>
325
- </div>
326
-
327
- <div id="method-M000018" class="method-detail">
328
- <a name="M000018"></a>
329
-
330
- <div class="method-heading">
331
- <a href="#M000018" class="method-signature">
332
- <span class="method-name">debuger</span><span class="method-args">()</span>
333
- </a>
334
- </div>
335
-
336
- <div class="method-description">
337
- <p>
338
- load debugger, inspired by rdp
339
- </p>
340
- <p><a class="source-toggle" href="#"
341
- onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
342
- <div class="method-source-code" id="M000018-source">
343
- <pre>
344
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 140</span>
345
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">debuger</span>
346
- <span class="ruby-keyword kw">begin</span>
347
- <span class="ruby-identifier">require</span> <span class="ruby-value str">'ruby-debug'</span>
348
- <span class="ruby-identifier">debugger</span>
349
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
350
- <span class="ruby-identifier">throw</span> <span class="ruby-node">&quot;Sorry, unable to load ruby-debug gem for debugger: #{e}&quot;</span>
351
- <span class="ruby-keyword kw">end</span>
352
- <span class="ruby-keyword kw">end</span>
353
- </pre>
354
- </div>
355
- </div>
356
- </div>
357
-
358
- <div id="method-M000010" class="method-detail">
359
- <a name="M000010"></a>
360
-
361
- <div class="method-heading">
362
- <span class="method-name">dir</span><span class="method-args">(path='.')</span>
363
- </div>
364
-
365
- <div class="method-description">
366
- <p>
367
- Alias for <a href="irbtools_rb.html#M000009">ls</a>
368
- </p>
369
- </div>
370
- </div>
371
-
372
- <div id="method-M000009" class="method-detail">
373
- <a name="M000009"></a>
374
-
375
- <div class="method-heading">
376
- <a href="#M000009" class="method-signature">
377
- <span class="method-name">ls</span><span class="method-args">(path='.')</span>
378
- </a>
379
- </div>
380
-
381
- <div class="method-description">
382
- <p>
383
- shows the contents of your current directory (more such commands available
384
- by FileUtils)
385
- </p>
386
- <p><a class="source-toggle" href="#"
387
- onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
388
- <div class="method-source-code" id="M000009-source">
389
- <pre>
390
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 79</span>
391
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ls</span>(<span class="ruby-identifier">path</span>=<span class="ruby-value str">'.'</span>)
392
- <span class="ruby-constant">Dir</span>[ <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>( <span class="ruby-identifier">path</span>, <span class="ruby-value str">'*'</span> )].<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">res</span><span class="ruby-operator">|</span> <span class="ruby-identifier">res</span> <span class="ruby-operator">=~</span> <span class="ruby-node">/^#{path}\/?/</span>; <span class="ruby-identifier">$'</span> }
393
- <span class="ruby-keyword kw">end</span>
394
- </pre>
395
- </div>
396
- </div>
397
- </div>
398
-
399
- <div id="method-M000002" class="method-detail">
400
- <a name="M000002"></a>
401
-
402
- <div class="method-heading">
403
- <a href="#M000002" class="method-signature">
404
- <span class="method-name">paste</span><span class="method-args">()</span>
405
- </a>
406
- </div>
407
-
408
- <div class="method-description">
409
- <p>
410
- pastes the clipboard
411
- </p>
412
- <p><a class="source-toggle" href="#"
413
- onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
414
- <div class="method-source-code" id="M000002-source">
415
- <pre>
416
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 33</span>
417
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">paste</span>
418
- <span class="ruby-constant">Clipboard</span>.<span class="ruby-identifier">paste</span>
419
- <span class="ruby-keyword kw">end</span>
420
- </pre>
421
- </div>
422
- </div>
423
- </div>
424
-
425
- <div id="method-M000008" class="method-detail">
426
- <a name="M000008"></a>
427
-
428
- <div class="method-heading">
429
- <a href="#M000008" class="method-signature">
430
- <span class="method-name">ray</span><span class="method-args">(path)</span>
431
- </a>
432
- </div>
433
-
434
- <div class="method-description">
435
- <p>
436
- syntax highlight a file
437
- </p>
438
- <p><a class="source-toggle" href="#"
439
- onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
440
- <div class="method-source-code" id="M000008-source">
441
- <pre>
442
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 59</span>
443
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ray</span>(<span class="ruby-identifier">path</span>)
444
- <span class="ruby-identifier">puts</span> <span class="ruby-constant">CodeRay</span>.<span class="ruby-identifier">scan</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">path</span>), <span class="ruby-identifier">:ruby</span> ).<span class="ruby-identifier">term</span>
445
- <span class="ruby-keyword kw">end</span>
446
- </pre>
447
- </div>
448
- </div>
449
- </div>
450
-
451
- <div id="method-M000015" class="method-detail">
452
- <a name="M000015"></a>
453
-
454
- <div class="method-heading">
455
- <a href="#M000015" class="method-signature">
456
- <span class="method-name">reset!</span><span class="method-args">(</span>
457
- </a>
458
- </div>
459
-
460
- <div class="method-description">
461
- <p>
462
- restart irb
463
- </p>
464
- <p><a class="source-toggle" href="#"
465
- onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
466
- <div class="method-source-code" id="M000015-source">
467
- <pre>
468
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 106</span>
469
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset!</span> <span class="ruby-comment cmt"># restart irb</span>
470
- <span class="ruby-identifier">exec</span><span class="ruby-identifier">$0</span>
471
- <span class="ruby-keyword kw">end</span>
472
- </pre>
473
- </div>
474
- </div>
475
- </div>
476
-
477
- <div id="method-M000013" class="method-detail">
478
- <a name="M000013"></a>
479
-
480
- <div class="method-heading">
481
- <a href="#M000013" class="method-signature">
482
- <span class="method-name">rq</span><span class="method-args">(lib)</span>
483
- </a>
484
- </div>
485
-
486
- <div class="method-description">
487
- <p>
488
- allows concise syntax like <a href="irbtools_rb.html#M000013">rq</a>:mathn
489
- </p>
490
- <p><a class="source-toggle" href="#"
491
- onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
492
- <div class="method-source-code" id="M000013-source">
493
- <pre>
494
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 96</span>
495
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rq</span>(<span class="ruby-identifier">lib</span>)
496
- <span class="ruby-identifier">require</span> <span class="ruby-identifier">lib</span>.<span class="ruby-identifier">to_s</span>
497
- <span class="ruby-keyword kw">end</span>
498
- </pre>
499
- </div>
500
- </div>
501
- </div>
502
-
503
- <div id="method-M000016" class="method-detail">
504
- <a name="M000016"></a>
505
-
506
- <div class="method-heading">
507
- <a href="#M000016" class="method-signature">
508
- <span class="method-name">ruby_version</span><span class="method-args">(which = nil)</span>
509
- </a>
510
- </div>
511
-
512
- <div class="method-description">
513
- <p><a class="source-toggle" href="#"
514
- onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
515
- <div class="method-source-code" id="M000016-source">
516
- <pre>
517
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 110</span>
518
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ruby_version</span>(<span class="ruby-identifier">which</span> = <span class="ruby-keyword kw">nil</span>)
519
- <span class="ruby-comment cmt"># test if installed</span>
520
- <span class="ruby-keyword kw">unless</span> <span class="ruby-value">`rvm -v`</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Seguin/</span>
521
- <span class="ruby-identifier">raise</span> <span class="ruby-value str">'Ruby Version Manager must be installed to use this command'</span>
522
- <span class="ruby-keyword kw">end</span>
523
-
524
- <span class="ruby-comment cmt"># show rubies if called without options</span>
525
- <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">which</span>
526
- <span class="ruby-identifier">puts</span> <span class="ruby-value str">'Availabe Rubies: '</span> <span class="ruby-operator">+</span>
527
- <span class="ruby-value">`rvm list`</span>.<span class="ruby-identifier">scan</span>( <span class="ruby-regexp re">/^(?: |=&gt;) (.*) \[/</span> )<span class="ruby-operator">*</span><span class="ruby-value str">&quot;, &quot;</span>
528
- <span class="ruby-keyword kw">return</span>
529
- <span class="ruby-keyword kw">end</span>
530
-
531
- <span class="ruby-comment cmt"># get irb suffix</span>
532
- <span class="ruby-identifier">rv</span> = <span class="ruby-node">`rvm use #{which}`</span> <span class="ruby-comment cmt"># e.g. =&gt; &quot;\ninfo: Using ruby 1.9.2 p0\n&quot;</span>
533
- <span class="ruby-comment cmt"># it does not change the ruby for the current user</span>
534
- <span class="ruby-identifier">rv</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^.*Using(.*)\n/</span>
535
-
536
- <span class="ruby-comment cmt"># if ruby is found, start it</span>
537
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$1</span>
538
- <span class="ruby-identifier">ruby_name</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">split</span>( <span class="ruby-identifier">$1</span> )[<span class="ruby-value">-1</span>].<span class="ruby-identifier">tr</span>(<span class="ruby-value str">' '</span>, <span class="ruby-value str">'-'</span>)
539
- <span class="ruby-identifier">irbname</span> = <span class="ruby-identifier">$0</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'-'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">ruby_name</span><span class="ruby-comment cmt"># + '@global'</span>
540
- <span class="ruby-identifier">exec</span> <span class="ruby-identifier">irbname</span>
541
- <span class="ruby-keyword kw">else</span>
542
- <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Sorry, that Ruby version could not be found.&quot;</span>
543
- <span class="ruby-keyword kw">end</span>
544
- <span class="ruby-keyword kw">end</span>
545
- </pre>
546
- </div>
547
- </div>
548
- </div>
549
-
550
- <div id="method-M000014" class="method-detail">
551
- <a name="M000014"></a>
552
-
553
- <div class="method-heading">
554
- <a href="#M000014" class="method-signature">
555
- <span class="method-name">session_history</span><span class="method-args">(number_of_lines = context.instance_variable_get(:@line_no) )</span>
556
- </a>
557
- </div>
558
-
559
- <div class="method-description">
560
- <p>
561
- returns the last lines, needed for some copy_ methods
562
- </p>
563
- <p><a class="source-toggle" href="#"
564
- onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
565
- <div class="method-source-code" id="M000014-source">
566
- <pre>
567
- <span class="ruby-comment cmt"># File lib/irbtools.rb, line 101</span>
568
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">session_history</span>(<span class="ruby-identifier">number_of_lines</span> = <span class="ruby-identifier">context</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">:@line_no</span>) )
569
- <span class="ruby-constant">Readline</span><span class="ruby-operator">::</span><span class="ruby-constant">HISTORY</span>.<span class="ruby-identifier">entries</span>[<span class="ruby-operator">-</span><span class="ruby-identifier">number_of_lines</span><span class="ruby-operator">...</span><span class="ruby-value">-1</span>]<span class="ruby-operator">*</span><span class="ruby-value str">&quot;\n&quot;</span>
570
- <span class="ruby-keyword kw">end</span>
571
- </pre>
572
- </div>
573
- </div>
574
- </div>
575
-
576
- <div id="method-M000017" class="method-detail">
577
- <a name="M000017"></a>
578
-
579
- <div class="method-heading">
580
- <span class="method-name">use</span><span class="method-args">(which = nil)</span>
581
- </div>
582
-
583
- <div class="method-description">
584
- <p>
585
- Alias for <a href="irbtools_rb.html#M000016">ruby_version</a>
586
- </p>
587
- </div>
588
- </div>
589
-
590
-
591
- </div>
592
-
593
-
594
- </div>
595
-
596
-
597
- <div id="validator-badges">
598
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
599
- </div>
600
-
601
- </body>
602
- </html>
@@ -1,30 +0,0 @@
1
-
2
- <?xml version="1.0" encoding="iso-8859-1"?>
3
- <!DOCTYPE html
4
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
-
7
- <!--
8
-
9
- Classes
10
-
11
- -->
12
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
- <head>
14
- <title>Classes</title>
15
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
16
- <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
- <base target="docwin" />
18
- </head>
19
- <body>
20
- <div id="index">
21
- <h1 class="section-bar">Classes</h1>
22
- <div id="index-entries">
23
- <a href="classes/IRB.html">IRB</a><br />
24
- <a href="classes/IRB/CaptureIO.html">IRB::CaptureIO</a><br />
25
- <a href="classes/Irbtools.html">Irbtools</a><br />
26
- <a href="classes/Kernel.html">Kernel</a><br />
27
- </div>
28
- </div>
29
- </body>
30
- </html>
@@ -1,29 +0,0 @@
1
-
2
- <?xml version="1.0" encoding="iso-8859-1"?>
3
- <!DOCTYPE html
4
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
-
7
- <!--
8
-
9
- Files
10
-
11
- -->
12
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
- <head>
14
- <title>Files</title>
15
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
16
- <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
- <base target="docwin" />
18
- </head>
19
- <body>
20
- <div id="index">
21
- <h1 class="section-bar">Files</h1>
22
- <div id="index-entries">
23
- <a href="files/README_rdoc.html">README.rdoc</a><br />
24
- <a href="files/lib/irbtools_rb.html">lib/irbtools.rb</a><br />
25
- <a href="files/lib/irbtools/configure_rb.html">lib/irbtools/configure.rb</a><br />
26
- </div>
27
- </div>
28
- </body>
29
- </html>