dirtravel 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.rdoc +3 -0
- data/README.rdoc +2 -2
- data/doc/DirTravel.html +105 -20
- data/doc/DirTravel/DirEntry.html +14 -14
- data/doc/DirTravel/DirTravelError.html +15 -4
- data/doc/DirTravel/Entry.html +90 -90
- data/doc/DirTravel/FileEntry.html +40 -20
- data/doc/DirTravel/Travel.html +231 -109
- data/doc/_index.html +5 -5
- data/doc/class_list.html +6 -1
- data/doc/css/style.css +2 -1
- data/doc/file.CHANGELOG.html +14 -11
- data/doc/file.README.html +10 -10
- data/doc/file_list.html +6 -1
- data/doc/frames.html +5 -7
- data/doc/index.html +10 -10
- data/doc/js/app.js +7 -2
- data/doc/js/full_list.js +9 -6
- data/doc/method_list.html +12 -1
- data/doc/top-level-namespace.html +4 -4
- data/lib/dirtravel.rb +99 -40
- data/lib/version.rb +6 -0
- data/test/test_dirtravel.rb +5 -5
- metadata +34 -31
- data/Rakefile +0 -28
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c3da3df5a994895a0687d73644483bc71d1c9931
|
4
|
+
data.tar.gz: c5ea06b6e0f9267a21feda8594582e20ebec7c56
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: efb5394faa7a0ac2293b37cf87874a2a4a67beb9504775afa5b9a7862a8cded3d8002b66d464b30b537fb12997320df090915ee58ea6750a26ebbaecd16df3ae
|
7
|
+
data.tar.gz: be23ffa2f8e4d7090dbf5aa9018785414853d46c29caf1d1c1a1a64f7ab3b89a1435de058d2a75d41b61716472826431f38357f56c529c9e41b532a38851ea3a
|
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
== Description
|
4
4
|
|
5
|
-
DirTravel provides filesystem directory content organized as a
|
5
|
+
{DirTravel} provides filesystem directory content organized as a
|
6
6
|
RubyTree structure. This structure can be conveniently accessed in
|
7
7
|
various ways.
|
8
8
|
|
9
9
|
== Documentation
|
10
10
|
|
11
|
-
Main documentation is generated from DirTravel source.
|
11
|
+
Main documentation is generated from {DirTravel} source.
|
data/doc/DirTravel.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: DirTravel
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.6
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '';
|
20
|
-
framesUrl = "frames.html#!"
|
20
|
+
framesUrl = "frames.html#!DirTravel.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -79,7 +79,9 @@
|
|
79
79
|
|
80
80
|
|
81
81
|
<dt class="r1 last">Defined in:</dt>
|
82
|
-
<dd class="r1 last">lib/dirtravel.rb
|
82
|
+
<dd class="r1 last">lib/dirtravel.rb<span class="defines">,<br />
|
83
|
+
lib/version.rb</span>
|
84
|
+
</dd>
|
83
85
|
|
84
86
|
</dl>
|
85
87
|
<div class="clear"></div>
|
@@ -87,24 +89,24 @@
|
|
87
89
|
<h2>Overview</h2><div class="docstring">
|
88
90
|
<div class="discussion">
|
89
91
|
|
90
|
-
<p>DirTravel is a library for getting information about files and
|
91
|
-
recursively to a tree structure. This library extends the
|
92
|
-
to include directory and files info. Please refer to
|
93
|
-
for RubyTree related features.</p>
|
92
|
+
<p><span class='object_link'><a href="" title="DirTravel (module)">DirTravel</a></span> is a library for getting information about files and
|
93
|
+
directories recursively to a tree structure. This library extends the
|
94
|
+
RubyTree classes to include directory and files info. Please refer to
|
95
|
+
RubyTree documentation for RubyTree related features.</p>
|
94
96
|
|
95
|
-
<p>A proxy object "DirTravel::Travel" is used to gather the directory content.
|
96
|
-
The
|
97
|
-
few options (see: DirTravel::Travel.filetree for details).</p>
|
97
|
+
<p>A proxy object <span class='object_link'><a href="DirTravel/Travel.html" title="DirTravel::Travel (class)">Travel</a></span> is used to gather the directory content.
|
98
|
+
The “filetree” class method provides interface for getting the content with
|
99
|
+
few options (see: <span class='object_link'><a href="DirTravel/Travel.html#filetree-class_method" title="DirTravel::Travel.filetree (method)">Travel.filetree</a></span> for details).</p>
|
98
100
|
|
99
|
-
<p>See the DirTravel::Entry methods doc for possibilities in examining the
|
101
|
+
<p>See the <span class='object_link'><a href="DirTravel/Entry.html" title="DirTravel::Entry (class)">Entry</a></span> methods doc for possibilities in examining the
|
100
102
|
directory hierachy.</p>
|
101
103
|
|
102
104
|
<p>Examples:</p>
|
103
105
|
|
104
|
-
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'
|
106
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>dirtravel</span><span class='tstring_end'>'</span></span>
|
105
107
|
|
106
|
-
<span class='comment'># Collect all entries under
|
107
|
-
</span><span class='id identifier rubyid_d'>d</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='tstring'><span class='tstring_beg'
|
108
|
+
<span class='comment'># Collect all entries under '.'
|
109
|
+
</span><span class='id identifier rubyid_d'>d</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='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.</span><span class='tstring_end'>'</span></span> <span class='rparen'>)</span>
|
108
110
|
|
109
111
|
<span class='comment'># Display names of the entries in the hierarhcy.
|
110
112
|
</span><span class='id identifier rubyid_d'>d</span><span class='period'>.</span><span class='id identifier rubyid_children'>children</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
|
@@ -116,10 +118,12 @@ directory hierachy.</p>
|
|
116
118
|
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_abspath'>abspath</span>
|
117
119
|
<span class='kw'>end</span>
|
118
120
|
|
119
|
-
<span class='comment'># Get MP3 files and create a list of all album directories
|
120
|
-
</span><span class='comment'>#
|
121
|
-
</span><span class='
|
122
|
-
|
121
|
+
<span class='comment'># Get MP3 files and create a list of all album directories.
|
122
|
+
</span><span class='comment'># Assume: ".../<album>/<song>" hierarhcy
|
123
|
+
</span><span class='comment'>#
|
124
|
+
</span><span class='id identifier rubyid_d'>d</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='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:suffix</span> <span class='op'>=></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>
|
125
|
+
<span class='id identifier rubyid_albums'>albums</span> <span class='op'>=</span> <span class='id identifier rubyid_d'>d</span><span class='period'>.</span><span class='id identifier rubyid_select_level'>select_level</span><span class='lparen'>(</span> <span class='id identifier rubyid_d'>d</span><span class='period'>.</span><span class='id identifier rubyid_node_height'>node_height</span> <span class='op'>-</span> <span class='int'>1</span> <span class='rparen'>)</span>
|
126
|
+
</code></pre>
|
123
127
|
|
124
128
|
|
125
129
|
</div>
|
@@ -138,20 +142,101 @@ directory hierachy.</p>
|
|
138
142
|
|
139
143
|
</p>
|
140
144
|
|
145
|
+
<h2>Constant Summary</h2>
|
146
|
+
|
147
|
+
<dl class="constants">
|
148
|
+
|
149
|
+
<dt id="VERSION-constant" class="">VERSION =
|
150
|
+
|
151
|
+
</dt>
|
152
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.0.6</span><span class='tstring_end'>"</span></span></pre></dd>
|
153
|
+
|
154
|
+
</dl>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
141
159
|
|
142
160
|
|
143
161
|
|
144
162
|
|
163
|
+
|
164
|
+
<h2>
|
165
|
+
Class Method Summary
|
166
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
167
|
+
</h2>
|
145
168
|
|
169
|
+
<ul class="summary">
|
170
|
+
|
171
|
+
<li class="public ">
|
172
|
+
<span class="summary_signature">
|
173
|
+
|
174
|
+
<a href="#version-class_method" title="version (class method)">+ (Object) <strong>version</strong> </a>
|
175
|
+
|
146
176
|
|
177
|
+
|
178
|
+
</span>
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
189
|
+
|
190
|
+
</li>
|
147
191
|
|
192
|
+
|
193
|
+
</ul>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
<div id="class_method_details" class="method_details_list">
|
199
|
+
<h2>Class Method Details</h2>
|
200
|
+
|
201
|
+
|
202
|
+
<div class="method_details first">
|
203
|
+
<h3 class="signature first" id="version-class_method">
|
204
|
+
|
205
|
+
+ (<tt>Object</tt>) <strong>version</strong>
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
</h3><table class="source_code">
|
212
|
+
<tr>
|
213
|
+
<td>
|
214
|
+
<pre class="lines">
|
215
|
+
|
216
|
+
|
217
|
+
3
|
218
|
+
4
|
219
|
+
5</pre>
|
220
|
+
</td>
|
221
|
+
<td>
|
222
|
+
<pre class="code"><span class="info file"># File 'lib/version.rb', line 3</span>
|
223
|
+
|
224
|
+
<span class='kw'>def</span> <span class='const'>DirTravel</span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span>
|
225
|
+
<span class='const'>DirTravel</span><span class='op'>::</span><span class='const'>VERSION</span>
|
226
|
+
<span class='kw'>end</span></pre>
|
227
|
+
</td>
|
228
|
+
</tr>
|
229
|
+
</table>
|
230
|
+
</div>
|
231
|
+
|
232
|
+
</div>
|
148
233
|
|
149
234
|
</div>
|
150
235
|
|
151
236
|
<div id="footer">
|
152
|
-
Generated on
|
237
|
+
Generated on Sun Apr 19 15:01:49 2015 by
|
153
238
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
154
|
-
0.8.6
|
239
|
+
0.8.7.6 (ruby-2.1.2).
|
155
240
|
</div>
|
156
241
|
|
157
242
|
</body>
|
data/doc/DirTravel/DirEntry.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: DirTravel::DirEntry
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.6
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!"
|
20
|
+
framesUrl = "../frames.html#!DirTravel/DirEntry.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -154,7 +154,7 @@
|
|
154
154
|
|
155
155
|
|
156
156
|
<span class="summary_desc"><div class='inline'>
|
157
|
-
<p>
|
157
|
+
<p>Set name and abspath if given.</p>
|
158
158
|
</div></span>
|
159
159
|
|
160
160
|
</li>
|
@@ -190,7 +190,7 @@
|
|
190
190
|
</h3><div class="docstring">
|
191
191
|
<div class="discussion">
|
192
192
|
|
193
|
-
<p>
|
193
|
+
<p>Set name and abspath if given.</p>
|
194
194
|
|
195
195
|
|
196
196
|
</div>
|
@@ -228,7 +228,7 @@
|
|
228
228
|
|
229
229
|
—
|
230
230
|
<div class='inline'>
|
231
|
-
<p>Set abspath if given.</p>
|
231
|
+
<p>Set abspath if given. Otherwise it is generated from pieces.</p>
|
232
232
|
</div>
|
233
233
|
|
234
234
|
</li>
|
@@ -242,15 +242,15 @@
|
|
242
242
|
<pre class="lines">
|
243
243
|
|
244
244
|
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
245
|
+
174
|
246
|
+
175
|
247
|
+
176
|
248
|
+
177
|
249
|
+
178
|
250
|
+
179</pre>
|
251
251
|
</td>
|
252
252
|
<td>
|
253
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
253
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 174</span>
|
254
254
|
|
255
255
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_abspath'>abspath</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
256
256
|
<span class='kw'>super</span><span class='lparen'>(</span> <span class='id identifier rubyid_name'>name</span> <span class='rparen'>)</span>
|
@@ -269,9 +269,9 @@
|
|
269
269
|
</div>
|
270
270
|
|
271
271
|
<div id="footer">
|
272
|
-
Generated on
|
272
|
+
Generated on Sun Apr 19 15:01:50 2015 by
|
273
273
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
274
|
-
0.8.6
|
274
|
+
0.8.7.6 (ruby-2.1.2).
|
275
275
|
</div>
|
276
276
|
|
277
277
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Exception: DirTravel::DirTravelError
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.6
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!"
|
20
|
+
framesUrl = "../frames.html#!DirTravel/DirTravelError.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -101,7 +101,18 @@
|
|
101
101
|
</dl>
|
102
102
|
<div class="clear"></div>
|
103
103
|
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
|
107
|
+
<p><span class='object_link'><a href="../DirTravel.html" title="DirTravel (module)">DirTravel</a></span> error.</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
104
114
|
|
115
|
+
</div>
|
105
116
|
|
106
117
|
|
107
118
|
|
@@ -114,9 +125,9 @@
|
|
114
125
|
</div>
|
115
126
|
|
116
127
|
<div id="footer">
|
117
|
-
Generated on
|
128
|
+
Generated on Sun Apr 19 15:01:49 2015 by
|
118
129
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
|
-
0.8.6
|
130
|
+
0.8.7.6 (ruby-2.1.2).
|
120
131
|
</div>
|
121
132
|
|
122
133
|
</body>
|
data/doc/DirTravel/Entry.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: DirTravel::Entry
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.6
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!"
|
20
|
+
framesUrl = "../frames.html#!DirTravel/Entry.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -144,7 +144,7 @@
|
|
144
144
|
|
145
145
|
|
146
146
|
<span class="summary_desc"><div class='inline'>
|
147
|
-
<p>
|
147
|
+
<p>Node name.</p>
|
148
148
|
</div></span>
|
149
149
|
|
150
150
|
</li>
|
@@ -255,7 +255,7 @@
|
|
255
255
|
|
256
256
|
|
257
257
|
<span class="summary_desc"><div class='inline'>
|
258
|
-
<p>
|
258
|
+
<p>Set name for <span class='object_link'><a href="" title="DirTravel::Entry (class)">Entry</a></span> (Dir/File).</p>
|
259
259
|
</div></span>
|
260
260
|
|
261
261
|
</li>
|
@@ -329,7 +329,7 @@
|
|
329
329
|
|
330
330
|
|
331
331
|
<span class="summary_desc"><div class='inline'>
|
332
|
-
<p>Relative path Entry
|
332
|
+
<p>Relative path <span class='object_link'><a href="" title="DirTravel::Entry (class)">Entry</a></span>.</p>
|
333
333
|
</div></span>
|
334
334
|
|
335
335
|
</li>
|
@@ -401,7 +401,7 @@
|
|
401
401
|
|
402
402
|
|
403
403
|
<span class="summary_desc"><div class='inline'>
|
404
|
-
<p>File.stat data for the Entry
|
404
|
+
<p>File.stat data for the <span class='object_link'><a href="" title="DirTravel::Entry (class)">Entry</a></span>.</p>
|
405
405
|
</div></span>
|
406
406
|
|
407
407
|
</li>
|
@@ -474,7 +474,7 @@
|
|
474
474
|
</h3><div class="docstring">
|
475
475
|
<div class="discussion">
|
476
476
|
|
477
|
-
<p>
|
477
|
+
<p>Set name for <span class='object_link'><a href="" title="DirTravel::Entry (class)">DirTravel::Entry</a></span> (Dir/File). Initialize abspath.</p>
|
478
478
|
|
479
479
|
|
480
480
|
</div>
|
@@ -488,13 +488,13 @@
|
|
488
488
|
<pre class="lines">
|
489
489
|
|
490
490
|
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
491
|
+
55
|
492
|
+
56
|
493
|
+
57
|
494
|
+
58</pre>
|
495
495
|
</td>
|
496
496
|
<td>
|
497
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
497
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 55</span>
|
498
498
|
|
499
499
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span> <span class='id identifier rubyid_name'>name</span> <span class='rparen'>)</span>
|
500
500
|
<span class='kw'>super</span><span class='lparen'>(</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
@@ -524,7 +524,7 @@
|
|
524
524
|
</h3><div class="docstring">
|
525
525
|
<div class="discussion">
|
526
526
|
|
527
|
-
<p>
|
527
|
+
<p>Node name.</p>
|
528
528
|
|
529
529
|
|
530
530
|
</div>
|
@@ -538,12 +538,12 @@
|
|
538
538
|
<pre class="lines">
|
539
539
|
|
540
540
|
|
541
|
-
|
542
|
-
|
543
|
-
|
541
|
+
51
|
542
|
+
52
|
543
|
+
53</pre>
|
544
544
|
</td>
|
545
545
|
<td>
|
546
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
546
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 51</span>
|
547
547
|
|
548
548
|
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
549
549
|
<span class='ivar'>@name</span>
|
@@ -586,22 +586,22 @@
|
|
586
586
|
<pre class="lines">
|
587
587
|
|
588
588
|
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
589
|
+
96
|
590
|
+
97
|
591
|
+
98
|
592
|
+
99
|
593
|
+
100
|
594
|
+
101
|
595
|
+
102</pre>
|
596
596
|
</td>
|
597
597
|
<td>
|
598
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
598
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 96</span>
|
599
599
|
|
600
600
|
<span class='kw'>def</span> <span class='id identifier rubyid_abspath'>abspath</span>
|
601
601
|
<span class='kw'>if</span> <span class='ivar'>@abspath</span>
|
602
602
|
<span class='ivar'>@abspath</span>
|
603
603
|
<span class='kw'>else</span>
|
604
|
-
<span class='id identifier rubyid_root'>root</span><span class='period'>.</span><span class='id identifier rubyid_abspath'>abspath</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'
|
604
|
+
<span class='id identifier rubyid_root'>root</span><span class='period'>.</span><span class='id identifier rubyid_abspath'>abspath</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='op'>+</span> <span class='id identifier rubyid_subpath'>subpath</span>
|
605
605
|
<span class='kw'>end</span>
|
606
606
|
<span class='kw'>end</span></pre>
|
607
607
|
</td>
|
@@ -675,15 +675,15 @@
|
|
675
675
|
<pre class="lines">
|
676
676
|
|
677
677
|
|
678
|
-
|
679
|
-
|
680
|
-
|
678
|
+
115
|
679
|
+
116
|
680
|
+
117</pre>
|
681
681
|
</td>
|
682
682
|
<td>
|
683
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
683
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 115</span>
|
684
684
|
|
685
685
|
<span class='kw'>def</span> <span class='id identifier rubyid_dir'>dir</span><span class='lparen'>(</span> <span class='id identifier rubyid_basedir'>basedir</span> <span class='op'>=</span> <span class='kw'>self</span> <span class='rparen'>)</span>
|
686
|
-
<span class='id identifier rubyid_parts'>parts</span><span class='lparen'>(</span> <span class='id identifier rubyid_basedir'>basedir</span><span class='period'>.</span><span class='id identifier rubyid_parent'>parent</span> <span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'
|
686
|
+
<span class='id identifier rubyid_parts'>parts</span><span class='lparen'>(</span> <span class='id identifier rubyid_basedir'>basedir</span><span class='period'>.</span><span class='id identifier rubyid_parent'>parent</span> <span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span> <span class='rparen'>)</span>
|
687
687
|
<span class='kw'>end</span></pre>
|
688
688
|
</td>
|
689
689
|
</tr>
|
@@ -716,12 +716,12 @@
|
|
716
716
|
<pre class="lines">
|
717
717
|
|
718
718
|
|
719
|
-
|
720
|
-
|
721
|
-
|
719
|
+
131
|
720
|
+
132
|
721
|
+
133</pre>
|
722
722
|
</td>
|
723
723
|
<td>
|
724
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
724
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 131</span>
|
725
725
|
|
726
726
|
<span class='kw'>def</span> <span class='id identifier rubyid_files'>files</span>
|
727
727
|
<span class='id identifier rubyid_select'>select</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span> <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span> <span class='const'>FileEntry</span> <span class='rparen'>)</span> <span class='kw'>end</span>
|
@@ -801,17 +801,17 @@
|
|
801
801
|
<pre class="lines">
|
802
802
|
|
803
803
|
|
804
|
-
59
|
805
|
-
60
|
806
|
-
61
|
807
|
-
62
|
808
|
-
63
|
809
|
-
64
|
810
804
|
65
|
811
|
-
66
|
805
|
+
66
|
806
|
+
67
|
807
|
+
68
|
808
|
+
69
|
809
|
+
70
|
810
|
+
71
|
811
|
+
72</pre>
|
812
812
|
</td>
|
813
813
|
<td>
|
814
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
814
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 65</span>
|
815
815
|
|
816
816
|
<span class='kw'>def</span> <span class='id identifier rubyid_parts'>parts</span><span class='lparen'>(</span> <span class='id identifier rubyid_basedir'>basedir</span> <span class='op'>=</span> <span class='kw'>self</span> <span class='rparen'>)</span>
|
817
817
|
<span class='id identifier rubyid_parents'>parents</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
@@ -852,15 +852,15 @@
|
|
852
852
|
<pre class="lines">
|
853
853
|
|
854
854
|
|
855
|
-
|
856
|
-
|
857
|
-
|
855
|
+
78
|
856
|
+
79
|
857
|
+
80</pre>
|
858
858
|
</td>
|
859
859
|
<td>
|
860
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
860
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 78</span>
|
861
861
|
|
862
862
|
<span class='kw'>def</span> <span class='id identifier rubyid_path'>path</span>
|
863
|
-
<span class='id identifier rubyid_parts'>parts</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'
|
863
|
+
<span class='id identifier rubyid_parts'>parts</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span> <span class='rparen'>)</span>
|
864
864
|
<span class='kw'>end</span></pre>
|
865
865
|
</td>
|
866
866
|
</tr>
|
@@ -879,7 +879,7 @@
|
|
879
879
|
</h3><div class="docstring">
|
880
880
|
<div class="discussion">
|
881
881
|
|
882
|
-
<p>Relative path Entry
|
882
|
+
<p>Relative path <span class='object_link'><a href="" title="DirTravel::Entry (class)">DirTravel::Entry</a></span>.</p>
|
883
883
|
|
884
884
|
|
885
885
|
</div>
|
@@ -906,15 +906,15 @@
|
|
906
906
|
<pre class="lines">
|
907
907
|
|
908
908
|
|
909
|
-
|
910
|
-
|
911
|
-
|
909
|
+
143
|
910
|
+
144
|
911
|
+
145</pre>
|
912
912
|
</td>
|
913
913
|
<td>
|
914
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
914
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 143</span>
|
915
915
|
|
916
916
|
<span class='kw'>def</span> <span class='id identifier rubyid_relative?'>relative?</span>
|
917
|
-
<span class='ivar'>@name</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'
|
917
|
+
<span class='ivar'>@name</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>
|
918
918
|
<span class='kw'>end</span></pre>
|
919
919
|
</td>
|
920
920
|
</tr>
|
@@ -953,7 +953,7 @@
|
|
953
953
|
|
954
954
|
—
|
955
955
|
<div class='inline'>
|
956
|
-
<p>If name is abspath then Entry becomes abspath.</p>
|
956
|
+
<p>If name is abspath then <span class='object_link'><a href="" title="DirTravel::Entry (class)">DirTravel::Entry</a></span> becomes abspath.</p>
|
957
957
|
</div>
|
958
958
|
|
959
959
|
</li>
|
@@ -967,23 +967,23 @@
|
|
967
967
|
<pre class="lines">
|
968
968
|
|
969
969
|
|
970
|
-
144
|
971
|
-
145
|
972
|
-
146
|
973
|
-
147
|
974
|
-
148
|
975
|
-
149
|
976
|
-
150
|
977
|
-
151
|
978
970
|
152
|
979
|
-
153
|
971
|
+
153
|
972
|
+
154
|
973
|
+
155
|
974
|
+
156
|
975
|
+
157
|
976
|
+
158
|
977
|
+
159
|
978
|
+
160
|
979
|
+
161</pre>
|
980
980
|
</td>
|
981
981
|
<td>
|
982
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
982
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 152</span>
|
983
983
|
|
984
984
|
<span class='kw'>def</span> <span class='id identifier rubyid_rename'>rename</span><span class='lparen'>(</span> <span class='id identifier rubyid_name'>name</span> <span class='rparen'>)</span>
|
985
985
|
<span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
|
986
|
-
|
986
|
+
|
987
987
|
<span class='comment'># Absolute or relative path?
|
988
988
|
</span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</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>
|
989
989
|
<span class='ivar'>@abspath</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
|
@@ -1060,12 +1060,12 @@
|
|
1060
1060
|
<pre class="lines">
|
1061
1061
|
|
1062
1062
|
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1063
|
+
125
|
1064
|
+
126
|
1065
|
+
127</pre>
|
1066
1066
|
</td>
|
1067
1067
|
<td>
|
1068
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
1068
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 125</span>
|
1069
1069
|
|
1070
1070
|
<span class='kw'>def</span> <span class='id identifier rubyid_select_level'>select_level</span><span class='lparen'>(</span> <span class='id identifier rubyid_level'>level</span> <span class='rparen'>)</span>
|
1071
1071
|
<span class='id identifier rubyid_select'>select</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span> <span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_node_depth'>node_depth</span> <span class='op'>==</span> <span class='id identifier rubyid_level'>level</span><span class='semicolon'>;</span> <span class='kw'>end</span>
|
@@ -1087,7 +1087,7 @@
|
|
1087
1087
|
</h3><div class="docstring">
|
1088
1088
|
<div class="discussion">
|
1089
1089
|
|
1090
|
-
<p>File.stat data for the Entry
|
1090
|
+
<p>File.stat data for the <span class='object_link'><a href="" title="DirTravel::Entry (class)">DirTravel::Entry</a></span>.</p>
|
1091
1091
|
|
1092
1092
|
|
1093
1093
|
</div>
|
@@ -1101,12 +1101,12 @@
|
|
1101
1101
|
<pre class="lines">
|
1102
1102
|
|
1103
1103
|
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1104
|
+
137
|
1105
|
+
138
|
1106
|
+
139</pre>
|
1107
1107
|
</td>
|
1108
1108
|
<td>
|
1109
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
1109
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 137</span>
|
1110
1110
|
|
1111
1111
|
<span class='kw'>def</span> <span class='id identifier rubyid_stat'>stat</span>
|
1112
1112
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_stat'>stat</span><span class='lparen'>(</span> <span class='id identifier rubyid_path'>path</span> <span class='rparen'>)</span>
|
@@ -1164,23 +1164,23 @@
|
|
1164
1164
|
<pre class="lines">
|
1165
1165
|
|
1166
1166
|
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1167
|
+
86
|
1168
|
+
87
|
1169
|
+
88
|
1170
|
+
89
|
1171
|
+
90
|
1172
|
+
91
|
1173
|
+
92</pre>
|
1174
1174
|
</td>
|
1175
1175
|
<td>
|
1176
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
1176
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 86</span>
|
1177
1177
|
|
1178
1178
|
<span class='kw'>def</span> <span class='id identifier rubyid_subpath'>subpath</span><span class='lparen'>(</span> <span class='id identifier rubyid_level'>level</span> <span class='op'>=</span> <span class='int'>1</span> <span class='rparen'>)</span>
|
1179
1179
|
<span class='id identifier rubyid_pa'>pa</span> <span class='op'>=</span> <span class='id identifier rubyid_parts'>parts</span>
|
1180
1180
|
<span class='kw'>if</span> <span class='id identifier rubyid_level'>level</span> <span class='op'><</span> <span class='int'>0</span> <span class='op'>||</span> <span class='id identifier rubyid_level'>level</span> <span class='op'>></span> <span class='id identifier rubyid_pa'>pa</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
|
1181
1181
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>DirTravelError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Invalid index for subpath level!</span><span class='tstring_end'>"</span></span>
|
1182
1182
|
<span class='kw'>end</span>
|
1183
|
-
<span class='id identifier rubyid_pa'>pa</span><span class='lbracket'>[</span> <span class='id identifier rubyid_level'>level</span> <span class='op'>..</span> <span class='op'>-</span><span class='int'>1</span> <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'
|
1183
|
+
<span class='id identifier rubyid_pa'>pa</span><span class='lbracket'>[</span> <span class='id identifier rubyid_level'>level</span> <span class='op'>..</span> <span class='op'>-</span><span class='int'>1</span> <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span> <span class='rparen'>)</span>
|
1184
1184
|
<span class='kw'>end</span></pre>
|
1185
1185
|
</td>
|
1186
1186
|
</tr>
|
@@ -1213,12 +1213,12 @@
|
|
1213
1213
|
<pre class="lines">
|
1214
1214
|
|
1215
1215
|
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1216
|
+
106
|
1217
|
+
107
|
1218
|
+
108</pre>
|
1219
1219
|
</td>
|
1220
1220
|
<td>
|
1221
|
-
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line
|
1221
|
+
<pre class="code"><span class="info file"># File 'lib/dirtravel.rb', line 106</span>
|
1222
1222
|
|
1223
1223
|
<span class='kw'>def</span> <span class='id identifier rubyid_tip'>tip</span>
|
1224
1224
|
<span class='ivar'>@name</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='tstring_end'>"</span></span> <span class='rparen'>)</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span>
|
@@ -1233,9 +1233,9 @@
|
|
1233
1233
|
</div>
|
1234
1234
|
|
1235
1235
|
<div id="footer">
|
1236
|
-
Generated on
|
1236
|
+
Generated on Sun Apr 19 15:01:50 2015 by
|
1237
1237
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1238
|
-
0.8.6
|
1238
|
+
0.8.7.6 (ruby-2.1.2).
|
1239
1239
|
</div>
|
1240
1240
|
|
1241
1241
|
</body>
|