dirtravel 0.0.5 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,23 +1,22 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1
+ <!DOCTYPE html>
2
+ <html>
4
3
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>
7
7
  Class: DirTravel::Travel
8
8
 
9
- &mdash; Documentation by YARD 0.8.6.1
9
+ &mdash; Documentation by YARD 0.9.36
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
17
+ <script type="text/javascript">
18
+ pathId = "DirTravel::Travel";
19
19
  relpath = '../';
20
- framesUrl = "../frames.html#!" + escape(window.location.href);
21
20
  </script>
22
21
 
23
22
 
@@ -28,51 +27,48 @@
28
27
 
29
28
  </head>
30
29
  <body>
31
- <div id="header">
32
- <div id="menu">
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
33
38
 
34
39
  <a href="../_index.html">Index (T)</a> &raquo;
35
40
  <span class='title'><span class='object_link'><a href="../DirTravel.html" title="DirTravel (module)">DirTravel</a></span></span>
36
41
  &raquo;
37
42
  <span class="title">Travel</span>
38
43
 
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
44
  </div>
42
45
 
43
- <div id="search">
46
+ <div id="search">
44
47
 
45
48
  <a class="full_list_link" id="class_list_link"
46
49
  href="../class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="../method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="../file_list.html">
57
- File List
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
58
56
  </a>
59
57
 
60
58
  </div>
61
- <div class="clear"></div>
62
- </div>
59
+ <div class="clear"></div>
60
+ </div>
63
61
 
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Class: DirTravel::Travel
62
+ <div id="content"><h1>Class: DirTravel::Travel
67
63
 
68
64
 
69
65
 
70
66
  </h1>
71
-
72
- <dl class="box">
67
+ <div class="box_info">
73
68
 
74
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
76
72
  <span class="inheritName">Object</span>
77
73
 
78
74
  <ul class="fullTree">
@@ -83,46 +79,52 @@
83
79
  </ul>
84
80
  <a href="#" class="inheritanceTree">show all</a>
85
81
 
86
- </dd>
87
-
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
88
87
 
89
88
 
90
-
91
89
 
92
-
93
90
 
91
+
94
92
 
93
+
95
94
 
96
- <dt class="r2 last">Defined in:</dt>
97
- <dd class="r2 last">lib/dirtravel.rb</dd>
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/dirtravel.rb</dd>
98
+ </dl>
98
99
 
99
- </dl>
100
- <div class="clear"></div>
100
+ </div>
101
101
 
102
102
  <h2>Overview</h2><div class="docstring">
103
103
  <div class="discussion">
104
104
 
105
- <p>Create directory recursion tree (with Travel.filetree). Optionally filter
106
- with suffix and modify tree building with options Hash (see below).</p>
105
+ <p>Create directory recursion tree (with <span class='object_link'><a href="#filetree-class_method" title="DirTravel::Travel.filetree (method)">Travel.filetree</a></span>). Optionally filter with suffix and modify tree building with options Hash (see below).</p>
107
106
 
108
- <h2>Parameters:</h2>
109
- <table class="rdoc-list"><tr><td class="rdoc-term"><p>sort</p></td>
110
- <td>
107
+ <p>If basedir is an absolute path, the root name is the search path. If basedir is a relative path, the current directory is changed to referenced directory before search and root name is the current directory, single level.</p>
108
+
109
+ <h2 id="label-Parameters-3A">Parameters:</h2>
110
+ <dl class="rdoc-list note-list"><dt>sort
111
+ <dd>
111
112
  <p>Sort directory entries (default: false).</p>
112
- </td></tr><tr><td class="rdoc-term"><p>suffix</p></td>
113
- <td>
114
- <p>Limit search to files with "suffix" (default: nil).</p>
115
- </td></tr><tr><td class="rdoc-term"><p>files</p></td>
116
- <td>
113
+ </dd><dt>suffix
114
+ <dd>
115
+ <p>Limit search to files with suffix (default: nil).</p>
116
+ </dd><dt>files
117
+ <dd>
117
118
  <p>Include files to search (default: true).</p>
118
- </td></tr><tr><td class="rdoc-term"><p>inclusive</p></td>
119
- <td>
119
+ </dd><dt>inclusive
120
+ <dd>
120
121
  <p>Basedirs parent becomes the basedir (default: false).</p>
121
- </td></tr></table>
122
+ </dd></dl>
122
123
 
123
124
  <p>Example:</p>
124
125
 
125
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_d1'>d1</span> <span class='op'>=</span> <span class='const'>DirTravel</span><span class='op'>::</span><span class='const'>Travel</span><span class='period'>.</span><span class='id identifier rubyid_filetree'>filetree</span><span class='lparen'>(</span> <span class='id identifier rubyid_dir1'>dir1</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:sort</span> <span class='op'>=&gt;</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='symbol'>:suffix</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.mp3</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span> <span class='rparen'>)</span></code></pre>
126
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_d1'>d1</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../DirTravel.html" title="DirTravel (module)">DirTravel</a></span></span><span class='op'>::</span><span class='const'>Travel</span><span class='period'>.</span><span class='id identifier rubyid_filetree'><span class='object_link'><a href="#filetree-class_method" title="DirTravel::Travel.filetree (method)">filetree</a></span></span><span class='lparen'>(</span> <span class='id identifier rubyid_dir1'>dir1</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:sort</span> <span class='op'>=&gt;</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='symbol'>:suffix</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.mp3</span><span class='tstring_end'>&#39;</span></span> <span class='rbrace'>}</span> <span class='rparen'>)</span>
127
+ </code></pre>
126
128
 
127
129
 
128
130
  </div>
@@ -134,13 +136,13 @@ with suffix and modify tree building with options Hash (see below).</p>
134
136
 
135
137
 
136
138
 
137
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
139
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
138
140
  <ul class="summary">
139
141
 
140
142
  <li class="public ">
141
143
  <span class="summary_signature">
142
144
 
143
- <a href="#abspath-instance_method" title="#abspath (instance method)">- (Object) <strong>abspath</strong> </a>
145
+ <a href="#abspath-instance_method" title="#abspath (instance method)">#<strong>abspath</strong> &#x21d2; Object </a>
144
146
 
145
147
 
146
148
 
@@ -167,7 +169,7 @@ with suffix and modify tree building with options Hash (see below).</p>
167
169
  <li class="public ">
168
170
  <span class="summary_signature">
169
171
 
170
- <a href="#basedir-instance_method" title="#basedir (instance method)">- (Object) <strong>basedir</strong> </a>
172
+ <a href="#basedir-instance_method" title="#basedir (instance method)">#<strong>basedir</strong> &#x21d2; Object </a>
171
173
 
172
174
 
173
175
 
@@ -185,7 +187,7 @@ with suffix and modify tree building with options Hash (see below).</p>
185
187
 
186
188
 
187
189
  <span class="summary_desc"><div class='inline'>
188
- <p>Starting directory for Travel.</p>
190
+ <p>Starting directory for <span class='object_link'><a href="" title="DirTravel::Travel (class)">Travel</a></span>.</p>
189
191
  </div></span>
190
192
 
191
193
  </li>
@@ -194,7 +196,7 @@ with suffix and modify tree building with options Hash (see below).</p>
194
196
  <li class="public ">
195
197
  <span class="summary_signature">
196
198
 
197
- <a href="#defaults-instance_method" title="#defaults (instance method)">- (Object) <strong>defaults</strong> </a>
199
+ <a href="#defaults-instance_method" title="#defaults (instance method)">#<strong>defaults</strong> &#x21d2; Object </a>
198
200
 
199
201
 
200
202
 
@@ -212,7 +214,7 @@ with suffix and modify tree building with options Hash (see below).</p>
212
214
 
213
215
 
214
216
  <span class="summary_desc"><div class='inline'>
215
- <p>Default options for Travel.</p>
217
+ <p>Default options for <span class='object_link'><a href="" title="DirTravel::Travel (class)">Travel</a></span>.</p>
216
218
  </div></span>
217
219
 
218
220
  </li>
@@ -221,7 +223,7 @@ with suffix and modify tree building with options Hash (see below).</p>
221
223
  <li class="public ">
222
224
  <span class="summary_signature">
223
225
 
224
- <a href="#root-instance_method" title="#root (instance method)">- (Object) <strong>root</strong> </a>
226
+ <a href="#root-instance_method" title="#root (instance method)">#<strong>root</strong> &#x21d2; Object </a>
225
227
 
226
228
 
227
229
 
@@ -239,7 +241,7 @@ with suffix and modify tree building with options Hash (see below).</p>
239
241
 
240
242
 
241
243
  <span class="summary_desc"><div class='inline'>
242
- <p>Root DirEntry of Travel.</p>
244
+ <p>Root <span class='object_link'><a href="DirEntry.html" title="DirTravel::DirEntry (class)">DirEntry</a></span> of <span class='object_link'><a href="" title="DirTravel::Travel (class)">Travel</a></span>.</p>
243
245
  </div></span>
244
246
 
245
247
  </li>
@@ -253,7 +255,7 @@ with suffix and modify tree building with options Hash (see below).</p>
253
255
 
254
256
  <h2>
255
257
  Class Method Summary
256
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
258
+ <small><a href="#" class="summary_toggle">collapse</a></small>
257
259
  </h2>
258
260
 
259
261
  <ul class="summary">
@@ -261,7 +263,7 @@ with suffix and modify tree building with options Hash (see below).</p>
261
263
  <li class="public ">
262
264
  <span class="summary_signature">
263
265
 
264
- <a href="#filetree-class_method" title="filetree (class method)">+ (DirEntry) <strong>filetree</strong>(basedir = '.', options = {}) </a>
266
+ <a href="#filetree-class_method" title="filetree (class method)">.<strong>filetree</strong>(basedir = &#39;.&#39;, options = {}) &#x21d2; DirEntry </a>
265
267
 
266
268
 
267
269
 
@@ -276,7 +278,7 @@ with suffix and modify tree building with options Hash (see below).</p>
276
278
 
277
279
 
278
280
  <span class="summary_desc"><div class='inline'>
279
- <p>Create directory recursion tree.</p>
281
+ <p>Create directory recursion tree and return root.</p>
280
282
  </div></span>
281
283
 
282
284
  </li>
@@ -286,7 +288,7 @@ with suffix and modify tree building with options Hash (see below).</p>
286
288
 
287
289
  <h2>
288
290
  Instance Method Summary
289
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
291
+ <small><a href="#" class="summary_toggle">collapse</a></small>
290
292
  </h2>
291
293
 
292
294
  <ul class="summary">
@@ -294,7 +296,7 @@ with suffix and modify tree building with options Hash (see below).</p>
294
296
  <li class="public ">
295
297
  <span class="summary_signature">
296
298
 
297
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (Travel) <strong>initialize</strong>(basedir, abspath, options = {}) </a>
299
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(basedir, abspath, options = {}) &#x21d2; Travel </a>
298
300
 
299
301
 
300
302
 
@@ -311,7 +313,7 @@ with suffix and modify tree building with options Hash (see below).</p>
311
313
 
312
314
 
313
315
  <span class="summary_desc"><div class='inline'>
314
- <p>A new instance of Travel.</p>
316
+ <p>Create directory recursion object.</p>
315
317
  </div></span>
316
318
 
317
319
  </li>
@@ -320,7 +322,7 @@ with suffix and modify tree building with options Hash (see below).</p>
320
322
  <li class="public ">
321
323
  <span class="summary_signature">
322
324
 
323
- <a href="#travel-instance_method" title="#travel (instance method)">- (Object) <strong>travel</strong>(suffix = @defaults[ :suffix ]) </a>
325
+ <a href="#travel-instance_method" title="#travel (instance method)">#<strong>travel</strong>(suffix = ) &#x21d2; Object </a>
324
326
 
325
327
 
326
328
 
@@ -350,7 +352,7 @@ with suffix and modify tree building with options Hash (see below).</p>
350
352
  <div class="method_details first">
351
353
  <h3 class="signature first" id="initialize-instance_method">
352
354
 
353
- - (<tt><span class='object_link'><a href="" title="DirTravel::Travel (class)">Travel</a></span></tt>) <strong>initialize</strong>(basedir, abspath, options = {})
355
+ #<strong>initialize</strong>(basedir, abspath, options = {}) &#x21d2; <tt><span class='object_link'><a href="" title="DirTravel::Travel (class)">Travel</a></span></tt>
354
356
 
355
357
 
356
358
 
@@ -359,13 +361,67 @@ with suffix and modify tree building with options Hash (see below).</p>
359
361
  </h3><div class="docstring">
360
362
  <div class="discussion">
361
363
 
362
- <p>A new instance of Travel</p>
364
+ <p>Create directory recursion object. Overlay options on top of defaults. Initialize root <span class='object_link'><a href="DirEntry.html" title="DirTravel::DirEntry (class)">DirEntry</a></span>.</p>
363
365
 
364
366
 
365
367
  </div>
366
368
  </div>
367
369
  <div class="tags">
370
+ <p class="tag_title">Parameters:</p>
371
+ <ul class="param">
368
372
 
373
+ <li>
374
+
375
+ <span class='name'>basedir</span>
376
+
377
+
378
+ <span class='type'>(<tt>String</tt>)</span>
379
+
380
+
381
+
382
+ &mdash;
383
+ <div class='inline'>
384
+ <p>Starting directory (top).</p>
385
+ </div>
386
+
387
+ </li>
388
+
389
+ <li>
390
+
391
+ <span class='name'>abspath</span>
392
+
393
+
394
+ <span class='type'>(<tt>String</tt>)</span>
395
+
396
+
397
+
398
+ &mdash;
399
+ <div class='inline'>
400
+ <p>Absolute path for root.</p>
401
+ </div>
402
+
403
+ </li>
404
+
405
+ <li>
406
+
407
+ <span class='name'>options</span>
408
+
409
+
410
+ <span class='type'>(<tt>Hash</tt>)</span>
411
+
412
+
413
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
414
+
415
+
416
+ &mdash;
417
+ <div class='inline'>
418
+ <p><span class='object_link'><a href="" title="DirTravel::Travel (class)">DirTravel::Travel</a></span> options.</p>
419
+ </div>
420
+
421
+ </li>
422
+
423
+ </ul>
424
+
369
425
 
370
426
  </div><table class="source_code">
371
427
  <tr>
@@ -373,39 +429,39 @@ with suffix and modify tree building with options Hash (see below).</p>
373
429
  <pre class="lines">
374
430
 
375
431
 
376
- 256
377
- 257
378
- 258
379
- 259
380
- 260
381
- 261
382
- 262
383
- 263
384
- 264
385
- 265
386
- 266
387
- 267
388
- 268
389
- 269
390
- 270</pre>
432
+ 312
433
+ 313
434
+ 314
435
+ 315
436
+ 316
437
+ 317
438
+ 318
439
+ 319
440
+ 320
441
+ 321
442
+ 322
443
+ 323
444
+ 324
445
+ 325
446
+ 326</pre>
391
447
  </td>
392
448
  <td>
393
- <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 256</span>
449
+ <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 312</span>
394
450
 
395
451
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span> <span class='id identifier rubyid_basedir'>basedir</span><span class='comma'>,</span> <span class='id identifier rubyid_abspath'>abspath</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='rparen'>)</span>
396
452
  <span class='ivar'>@basedir</span> <span class='op'>=</span> <span class='id identifier rubyid_basedir'>basedir</span>
397
453
  <span class='ivar'>@abspath</span> <span class='op'>=</span> <span class='id identifier rubyid_abspath'>abspath</span>
398
454
 
399
455
  <span class='ivar'>@defaults</span> <span class='op'>=</span> <span class='lbrace'>{</span>
400
- <span class='symbol'>:suffix</span> <span class='op'>=&gt;</span> <span class='kw'>nil</span><span class='comma'>,</span>
401
- <span class='symbol'>:sort</span> <span class='op'>=&gt;</span> <span class='kw'>false</span><span class='comma'>,</span>
402
- <span class='symbol'>:files</span> <span class='op'>=&gt;</span> <span class='kw'>true</span><span class='comma'>,</span>
403
- <span class='symbol'>:inclusive</span> <span class='op'>=&gt;</span> <span class='kw'>false</span><span class='comma'>,</span>
404
- <span class='rbrace'>}</span>
456
+ <span class='symbol'>:suffix</span> <span class='op'>=&gt;</span> <span class='kw'>nil</span><span class='comma'>,</span>
457
+ <span class='symbol'>:sort</span> <span class='op'>=&gt;</span> <span class='kw'>false</span><span class='comma'>,</span>
458
+ <span class='symbol'>:files</span> <span class='op'>=&gt;</span> <span class='kw'>true</span><span class='comma'>,</span>
459
+ <span class='symbol'>:inclusive</span> <span class='op'>=&gt;</span> <span class='kw'>false</span><span class='comma'>,</span>
460
+ <span class='rbrace'>}</span>
405
461
 
406
462
  <span class='ivar'>@defaults</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span> <span class='id identifier rubyid_options'>options</span> <span class='rparen'>)</span>
407
463
 
408
- <span class='ivar'>@root</span> <span class='op'>=</span> <span class='const'>DirEntry</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='id identifier rubyid_basedir'>basedir</span><span class='comma'>,</span> <span class='id identifier rubyid_abspath'>abspath</span> <span class='rparen'>)</span>
464
+ <span class='ivar'>@root</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="DirEntry.html" title="DirTravel::DirEntry (class)">DirEntry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="DirEntry.html#initialize-instance_method" title="DirTravel::DirEntry#initialize (method)">new</a></span></span><span class='lparen'>(</span> <span class='id identifier rubyid_basedir'>basedir</span><span class='comma'>,</span> <span class='id identifier rubyid_abspath'>abspath</span> <span class='rparen'>)</span>
409
465
  <span class='kw'>end</span></pre>
410
466
  </td>
411
467
  </tr>
@@ -422,7 +478,7 @@ with suffix and modify tree building with options Hash (see below).</p>
422
478
  <div class="method_details first">
423
479
  <h3 class="signature first" id="abspath-instance_method">
424
480
 
425
- - (<tt>Object</tt>) <strong>abspath</strong>
481
+ #<strong>abspath</strong> &#x21d2; <tt>Object</tt>
426
482
 
427
483
 
428
484
 
@@ -431,7 +487,7 @@ with suffix and modify tree building with options Hash (see below).</p>
431
487
  </h3><div class="docstring">
432
488
  <div class="discussion">
433
489
 
434
- <p>Returns the value of attribute abspath</p>
490
+ <p>Returns the value of attribute abspath.</p>
435
491
 
436
492
 
437
493
  </div>
@@ -445,12 +501,12 @@ with suffix and modify tree building with options Hash (see below).</p>
445
501
  <pre class="lines">
446
502
 
447
503
 
448
- 215
449
- 216
450
- 217</pre>
504
+ 232
505
+ 233
506
+ 234</pre>
451
507
  </td>
452
508
  <td>
453
- <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 215</span>
509
+ <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 232</span>
454
510
 
455
511
  <span class='kw'>def</span> <span class='id identifier rubyid_abspath'>abspath</span>
456
512
  <span class='ivar'>@abspath</span>
@@ -465,7 +521,7 @@ with suffix and modify tree building with options Hash (see below).</p>
465
521
  <div class="method_details ">
466
522
  <h3 class="signature " id="basedir-instance_method">
467
523
 
468
- - (<tt>Object</tt>) <strong>basedir</strong>
524
+ #<strong>basedir</strong> &#x21d2; <tt>Object</tt>
469
525
 
470
526
 
471
527
 
@@ -474,7 +530,7 @@ with suffix and modify tree building with options Hash (see below).</p>
474
530
  </h3><div class="docstring">
475
531
  <div class="discussion">
476
532
 
477
- <p>Starting directory for Travel.</p>
533
+ <p>Starting directory for <span class='object_link'><a href="" title="DirTravel::Travel (class)">DirTravel::Travel</a></span>.</p>
478
534
 
479
535
 
480
536
  </div>
@@ -488,12 +544,12 @@ with suffix and modify tree building with options Hash (see below).</p>
488
544
  <pre class="lines">
489
545
 
490
546
 
491
- 214
492
- 215
493
- 216</pre>
547
+ 231
548
+ 232
549
+ 233</pre>
494
550
  </td>
495
551
  <td>
496
- <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 214</span>
552
+ <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 231</span>
497
553
 
498
554
  <span class='kw'>def</span> <span class='id identifier rubyid_basedir'>basedir</span>
499
555
  <span class='ivar'>@basedir</span>
@@ -508,7 +564,7 @@ with suffix and modify tree building with options Hash (see below).</p>
508
564
  <div class="method_details ">
509
565
  <h3 class="signature " id="defaults-instance_method">
510
566
 
511
- - (<tt>Object</tt>) <strong>defaults</strong>
567
+ #<strong>defaults</strong> &#x21d2; <tt>Object</tt>
512
568
 
513
569
 
514
570
 
@@ -517,7 +573,7 @@ with suffix and modify tree building with options Hash (see below).</p>
517
573
  </h3><div class="docstring">
518
574
  <div class="discussion">
519
575
 
520
- <p>Default options for Travel.</p>
576
+ <p>Default options for <span class='object_link'><a href="" title="DirTravel::Travel (class)">DirTravel::Travel</a></span>.</p>
521
577
 
522
578
 
523
579
  </div>
@@ -531,12 +587,12 @@ with suffix and modify tree building with options Hash (see below).</p>
531
587
  <pre class="lines">
532
588
 
533
589
 
534
- 211
535
- 212
536
- 213</pre>
590
+ 228
591
+ 229
592
+ 230</pre>
537
593
  </td>
538
594
  <td>
539
- <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 211</span>
595
+ <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 228</span>
540
596
 
541
597
  <span class='kw'>def</span> <span class='id identifier rubyid_defaults'>defaults</span>
542
598
  <span class='ivar'>@defaults</span>
@@ -551,7 +607,7 @@ with suffix and modify tree building with options Hash (see below).</p>
551
607
  <div class="method_details ">
552
608
  <h3 class="signature " id="root-instance_method">
553
609
 
554
- - (<tt>Object</tt>) <strong>root</strong>
610
+ #<strong>root</strong> &#x21d2; <tt>Object</tt>
555
611
 
556
612
 
557
613
 
@@ -560,7 +616,7 @@ with suffix and modify tree building with options Hash (see below).</p>
560
616
  </h3><div class="docstring">
561
617
  <div class="discussion">
562
618
 
563
- <p>Root DirEntry of Travel.</p>
619
+ <p>Root <span class='object_link'><a href="DirEntry.html" title="DirTravel::DirEntry (class)">DirEntry</a></span> of <span class='object_link'><a href="" title="DirTravel::Travel (class)">DirTravel::Travel</a></span>.</p>
564
620
 
565
621
 
566
622
  </div>
@@ -574,14 +630,14 @@ with suffix and modify tree building with options Hash (see below).</p>
574
630
  <pre class="lines">
575
631
 
576
632
 
577
- 208
578
- 209
579
- 210</pre>
633
+ 225
634
+ 226
635
+ 227</pre>
580
636
  </td>
581
637
  <td>
582
- <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 208</span>
638
+ <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 225</span>
583
639
 
584
- <span class='kw'>def</span> <span class='id identifier rubyid_root'>root</span>
640
+ <span class='kw'>def</span> <span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span>
585
641
  <span class='ivar'>@root</span>
586
642
  <span class='kw'>end</span></pre>
587
643
  </td>
@@ -599,7 +655,7 @@ with suffix and modify tree building with options Hash (see below).</p>
599
655
  <div class="method_details first">
600
656
  <h3 class="signature first" id="filetree-class_method">
601
657
 
602
- + (<tt><span class='object_link'><a href="DirEntry.html" title="DirTravel::DirEntry (class)">DirEntry</a></span></tt>) <strong>filetree</strong>(basedir = '.', options = {})
658
+ .<strong>filetree</strong>(basedir = &#39;.&#39;, options = {}) &#x21d2; <tt><span class='object_link'><a href="DirEntry.html" title="DirTravel::DirEntry (class)">DirEntry</a></span></tt>
603
659
 
604
660
 
605
661
 
@@ -608,7 +664,7 @@ with suffix and modify tree building with options Hash (see below).</p>
608
664
  </h3><div class="docstring">
609
665
  <div class="discussion">
610
666
 
611
- <p>Create directory recursion tree.</p>
667
+ <p>Create directory recursion tree and return root.</p>
612
668
 
613
669
 
614
670
  </div>
@@ -625,7 +681,7 @@ with suffix and modify tree building with options Hash (see below).</p>
625
681
  <span class='type'>(<tt>String</tt>)</span>
626
682
 
627
683
 
628
- <em class="default">(defaults to: <tt>'.'</tt>)</em>
684
+ <em class="default">(defaults to: <tt>&#39;.&#39;</tt>)</em>
629
685
 
630
686
 
631
687
  &mdash;
@@ -648,7 +704,7 @@ with suffix and modify tree building with options Hash (see below).</p>
648
704
 
649
705
  &mdash;
650
706
  <div class='inline'>
651
- <p>Hash optionally including keys: :sort, :suffix, :files.</p>
707
+ <p><span class='object_link'><a href="" title="DirTravel::Travel (class)">DirTravel::Travel</a></span> options.</p>
652
708
  </div>
653
709
 
654
710
  </li>
@@ -667,7 +723,7 @@ with suffix and modify tree building with options Hash (see below).</p>
667
723
 
668
724
  &mdash;
669
725
  <div class='inline'>
670
- <p>Root item of the file system hierarchy.</p>
726
+ <p>Root of the file travel hierarchy.</p>
671
727
  </div>
672
728
 
673
729
  </li>
@@ -680,25 +736,6 @@ with suffix and modify tree building with options Hash (see below).</p>
680
736
  <pre class="lines">
681
737
 
682
738
 
683
- 221
684
- 222
685
- 223
686
- 224
687
- 225
688
- 226
689
- 227
690
- 228
691
- 229
692
- 230
693
- 231
694
- 232
695
- 233
696
- 234
697
- 235
698
- 236
699
- 237
700
- 238
701
- 239
702
739
  240
703
740
  241
704
741
  242
@@ -712,43 +749,124 @@ with suffix and modify tree building with options Hash (see below).</p>
712
749
  250
713
750
  251
714
751
  252
715
- 253</pre>
752
+ 253
753
+ 254
754
+ 255
755
+ 256
756
+ 257
757
+ 258
758
+ 259
759
+ 260
760
+ 261
761
+ 262
762
+ 263
763
+ 264
764
+ 265
765
+ 266
766
+ 267
767
+ 268
768
+ 269
769
+ 270
770
+ 271
771
+ 272
772
+ 273
773
+ 274
774
+ 275
775
+ 276
776
+ 277
777
+ 278
778
+ 279
779
+ 280
780
+ 281
781
+ 282
782
+ 283
783
+ 284
784
+ 285
785
+ 286
786
+ 287
787
+ 288
788
+ 289
789
+ 290
790
+ 291
791
+ 292
792
+ 293
793
+ 294
794
+ 295
795
+ 296
796
+ 297
797
+ 298
798
+ 299
799
+ 300
800
+ 301
801
+ 302
802
+ 303</pre>
716
803
  </td>
717
804
  <td>
718
- <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 221</span>
805
+ <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 240</span>
806
+
807
+ <span class='kw'>def</span> <span class='const'><span class='object_link'><a href="" title="DirTravel::Travel (class)">Travel</a></span></span><span class='period'>.</span><span class='id identifier rubyid_filetree'>filetree</span><span class='lparen'>(</span> <span class='id identifier rubyid_basedir'>basedir</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='rparen'>)</span>
719
808
 
720
- <span class='kw'>def</span> <span class='const'>Travel</span><span class='period'>.</span><span class='id identifier rubyid_filetree'>filetree</span><span class='lparen'>(</span> <span class='id identifier rubyid_basedir'>basedir</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='rparen'>)</span>
809
+ <span class='comment'># Non-nil if directory needs to be changed.
810
+ </span> <span class='id identifier rubyid_pwd'>pwd</span> <span class='op'>=</span> <span class='kw'>nil</span>
721
811
 
722
- <span class='id identifier rubyid_pwd'>pwd</span> <span class='op'>=</span> <span class='kw'>nil</span>
812
+ <span class='kw'>if</span> <span class='id identifier rubyid_basedir'>basedir</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/</span><span class='tstring_end'>&#39;</span></span>
723
813
 
724
- <span class='kw'>if</span> <span class='id identifier rubyid_basedir'>basedir</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span>
725
- <span class='id identifier rubyid_t'>t</span> <span class='op'>=</span> <span class='const'>Travel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='id identifier rubyid_basedir'>basedir</span><span class='comma'>,</span> <span class='id identifier rubyid_basedir'>basedir</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='rparen'>)</span>
814
+ <span class='comment'># Absolue path.
815
+ </span> <span class='id identifier rubyid_t'>t</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="DirTravel::Travel (class)">Travel</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="DirTravel::Travel#initialize (method)">new</a></span></span><span class='lparen'>(</span> <span class='id identifier rubyid_basedir'>basedir</span><span class='comma'>,</span> <span class='id identifier rubyid_basedir'>basedir</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='rparen'>)</span>
726
816
  <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_travel'>travel</span>
817
+
727
818
  <span class='kw'>else</span>
728
- <span class='id identifier rubyid_pwd'>pwd</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_pwd'>pwd</span>
729
- <span class='id identifier rubyid_full'>full</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span> <span class='id identifier rubyid_basedir'>basedir</span> <span class='rparen'>)</span>
819
+
820
+ <span class='comment'># Relative path.
821
+ </span>
822
+ <span class='comment'># Store current directory before chdir.
823
+ </span> <span class='id identifier rubyid_pwd'>pwd</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_pwd'>pwd</span>
824
+
825
+ <span class='comment'># Generate target directory for chdir. One up from
826
+ </span> <span class='comment'># the reference.
827
+ </span> <span class='id identifier rubyid_full'>full</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span> <span class='id identifier rubyid_basedir'>basedir</span> <span class='rparen'>)</span>
730
828
  <span class='id identifier rubyid_base'>base</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span> <span class='id identifier rubyid_full'>full</span> <span class='rparen'>)</span>
731
829
  <span class='id identifier rubyid_dir'>dir</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span> <span class='id identifier rubyid_full'>full</span> <span class='rparen'>)</span>
732
- <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_chdir'>chdir</span><span class='lparen'>(</span> <span class='id identifier rubyid_dir'>dir</span> <span class='rparen'>)</span>
733
- <span class='id identifier rubyid_t'>t</span> <span class='op'>=</span> <span class='const'>Travel</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='id identifier rubyid_base'>base</span><span class='comma'>,</span> <span class='id identifier rubyid_full'>full</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='rparen'>)</span>
830
+
831
+ <span class='comment'># Goto target.
832
+ </span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_chdir'>chdir</span><span class='lparen'>(</span> <span class='id identifier rubyid_dir'>dir</span> <span class='rparen'>)</span>
833
+
834
+ <span class='id identifier rubyid_t'>t</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="DirTravel::Travel (class)">Travel</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="DirTravel::Travel#initialize (method)">new</a></span></span><span class='lparen'>(</span> <span class='id identifier rubyid_base'>base</span><span class='comma'>,</span> <span class='id identifier rubyid_full'>full</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='rparen'>)</span>
734
835
  <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_travel'>travel</span>
735
836
  <span class='kw'>end</span>
736
837
 
838
+
737
839
  <span class='kw'>if</span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_defaults'>defaults</span><span class='lbracket'>[</span> <span class='symbol'>:inclusive</span> <span class='rbracket'>]</span>
738
- <span class='id identifier rubyid_uppath'>uppath</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span><span class='period'>.</span><span class='id identifier rubyid_abspath'>abspath</span> <span class='rparen'>)</span>
739
- <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_uppath'>uppath</span>
840
+
841
+ <span class='comment'># With inclusive the root is changed to one-up from
842
+ </span> <span class='comment'># target.
843
+ </span>
844
+ <span class='comment'># One up from root.
845
+ </span> <span class='id identifier rubyid_uppath'>uppath</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span><span class='period'>.</span><span class='id identifier rubyid_abspath'>abspath</span> <span class='rparen'>)</span>
740
846
  <span class='kw'>if</span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span><span class='period'>.</span><span class='id identifier rubyid_relative?'>relative?</span>
741
847
  <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span> <span class='id identifier rubyid_uppath'>uppath</span> <span class='rparen'>)</span>
848
+ <span class='kw'>else</span>
849
+ <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_uppath'>uppath</span>
742
850
  <span class='kw'>end</span>
743
- <span class='id identifier rubyid_newRoot'>newRoot</span> <span class='op'>=</span> <span class='const'>DirEntry</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_uppath'>uppath</span> <span class='rparen'>)</span>
744
- <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span><span class='period'>.</span><span class='id identifier rubyid_rename'>rename</span><span class='lparen'>(</span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span><span class='period'>.</span><span class='id identifier rubyid_tip'>tip</span> <span class='rparen'>)</span>
745
- <span class='id identifier rubyid_newRoot'>newRoot</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span> <span class='rparen'>)</span>
746
- <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span> <span class='op'>=</span> <span class='id identifier rubyid_newRoot'>newRoot</span>
851
+
852
+ <span class='comment'># Create the &quot;one-up&quot; root.
853
+ </span> <span class='id identifier rubyid_newRoot'>newRoot</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="DirEntry.html" title="DirTravel::DirEntry (class)">DirEntry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="DirEntry.html#initialize-instance_method" title="DirTravel::DirEntry#initialize (method)">new</a></span></span><span class='lparen'>(</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_uppath'>uppath</span> <span class='rparen'>)</span>
854
+
855
+ <span class='comment'># Rename old root.
856
+ </span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span><span class='period'>.</span><span class='id identifier rubyid_rename'>rename</span><span class='lparen'>(</span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span><span class='period'>.</span><span class='id identifier rubyid_tip'>tip</span> <span class='rparen'>)</span>
857
+
858
+ <span class='comment'># Add to one-up root.
859
+ </span> <span class='id identifier rubyid_newRoot'>newRoot</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span> <span class='rparen'>)</span>
860
+
861
+ <span class='comment'># Set root to one-up root.
862
+ </span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span> <span class='op'>=</span> <span class='id identifier rubyid_newRoot'>newRoot</span>
747
863
  <span class='kw'>end</span>
748
864
 
749
- <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_chdir'>chdir</span><span class='lparen'>(</span> <span class='id identifier rubyid_pwd'>pwd</span> <span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_pwd'>pwd</span>
865
+ <span class='comment'># Return back to start directory if dir changed.
866
+ </span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_chdir'>chdir</span><span class='lparen'>(</span> <span class='id identifier rubyid_pwd'>pwd</span> <span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_pwd'>pwd</span>
750
867
 
751
- <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span>
868
+ <span class='comment'># Return root {DirEntry}.
869
+ </span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span>
752
870
  <span class='kw'>end</span></pre>
753
871
  </td>
754
872
  </tr>
@@ -764,7 +882,7 @@ with suffix and modify tree building with options Hash (see below).</p>
764
882
  <div class="method_details first">
765
883
  <h3 class="signature first" id="travel-instance_method">
766
884
 
767
- - (<tt>Object</tt>) <strong>travel</strong>(suffix = @defaults[ :suffix ])
885
+ #<strong>travel</strong>(suffix = ) &#x21d2; <tt>Object</tt>
768
886
 
769
887
 
770
888
 
@@ -787,12 +905,12 @@ with suffix and modify tree building with options Hash (see below).</p>
787
905
  <pre class="lines">
788
906
 
789
907
 
790
- 275
791
- 276
792
- 277</pre>
908
+ 331
909
+ 332
910
+ 333</pre>
793
911
  </td>
794
912
  <td>
795
- <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 275</span>
913
+ <pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 331</span>
796
914
 
797
915
  <span class='kw'>def</span> <span class='id identifier rubyid_travel'>travel</span><span class='lparen'>(</span> <span class='id identifier rubyid_suffix'>suffix</span> <span class='op'>=</span> <span class='ivar'>@defaults</span><span class='lbracket'>[</span> <span class='symbol'>:suffix</span> <span class='rbracket'>]</span> <span class='rparen'>)</span>
798
916
  <span class='id identifier rubyid_entriesIn'>entriesIn</span><span class='lparen'>(</span> <span class='ivar'>@basedir</span><span class='comma'>,</span> <span class='ivar'>@root</span><span class='comma'>,</span> <span class='id identifier rubyid_suffix'>suffix</span> <span class='rparen'>)</span>
@@ -806,11 +924,12 @@ with suffix and modify tree building with options Hash (see below).</p>
806
924
 
807
925
  </div>
808
926
 
809
- <div id="footer">
810
- Generated on Thu Jan 23 19:01:13 2014 by
811
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
812
- 0.8.6.1 (ruby-1.9.3).
927
+ <div id="footer">
928
+ Generated on Fri Jun 28 14:38:02 2024 by
929
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
930
+ 0.9.36 (ruby-3.1.2).
813
931
  </div>
814
932
 
933
+ </div>
815
934
  </body>
816
935
  </html>