reflection 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,657 @@
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">
4
+ <head>
5
+ <meta name="Content-Type" content="text/html; charset=UTF-8" />
6
+ <title>Class: Reflection::Directory::Base</title>
7
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '../..';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <div id="header">
20
+ <div id="menu">
21
+
22
+ <a href="../../_index.html">Index (B)</a> &raquo;
23
+ <a title="Reflection" href="../../Reflection.html">Reflection</a> &raquo; <a title="Directory" href="../Directory.html">Directory</a>
24
+ &raquo;
25
+ <span class="title">Base</span>
26
+
27
+ </div>
28
+
29
+ <div id="search">
30
+ <a id="class_list_link" href="#">Namespace List</a>
31
+ <a id="method_list_link" href="#">Method List</a>
32
+ <a id ="file_list_link" href="#">File List</a>
33
+ </div>
34
+
35
+ <div class="clear"></div>
36
+ </div>
37
+
38
+ <iframe id="search_frame"></iframe>
39
+
40
+ <div id="content"><h1>Class: Reflection::Directory::Base
41
+
42
+
43
+ </h1>
44
+
45
+ <dl class="box">
46
+
47
+ <dt class="r1">Inherits:</dt>
48
+ <dd class="r1">
49
+ <span class="inheritName">Object</span>
50
+
51
+ </dd>
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+ <dt class="r2 last">Defined in:</dt>
61
+ <dd class="r2 last">lib/reflection/directory/base.rb</dd>
62
+
63
+ </dl>
64
+ <div class="clear"></div>
65
+
66
+
67
+
68
+ <h2>Attribute Summary</h2>
69
+ <ul class="summary">
70
+
71
+ <li class="public ">
72
+ <span class="summary_signature"><a title="#path (instance method)" href="#path-instance_method">- (Object) <strong>path</strong> </a>
73
+
74
+ </span>
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+ <span class="summary_desc">
85
+ Returns the value of attribute <tt>path</tt>.
86
+
87
+ </span>
88
+
89
+ </li>
90
+
91
+
92
+ </ul>
93
+
94
+
95
+ <h2>Method Summary</h2>
96
+ <ul class="summary">
97
+
98
+ <li class="public ">
99
+ <span class="summary_signature"><a title="#clean! (instance method)" href="#clean%21-instance_method">- (Object) <strong>clean!</strong> </a>
100
+
101
+ </span>
102
+
103
+
104
+
105
+
106
+
107
+
108
+ <span class="summary_desc"></span>
109
+
110
+ </li>
111
+
112
+
113
+ <li class="public ">
114
+ <span class="summary_signature"><a title="#copy_git_index_to (instance method)" href="#copy_git_index_to-instance_method">- (Object) <strong>copy_git_index_to</strong>(target_path) </a>
115
+
116
+ </span>
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <span class="summary_desc"></span>
124
+
125
+ </li>
126
+
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature"><a title="#exists? (instance method)" href="#exists%3F-instance_method">- (Object) <strong>exists?</strong> </a>
130
+
131
+ </span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+ <span class="summary_desc"></span>
139
+
140
+ </li>
141
+
142
+
143
+ <li class="public ">
144
+ <span class="summary_signature"><a title="#get_git_index_from (instance method)" href="#get_git_index_from-instance_method">- (Object) <strong>get_git_index_from</strong>(target_path) </a>
145
+
146
+ </span>
147
+
148
+
149
+
150
+
151
+
152
+
153
+ <span class="summary_desc"></span>
154
+
155
+ </li>
156
+
157
+
158
+ <li class="public ">
159
+ <span class="summary_signature"><a title="#git_index (instance method)" href="#git_index-instance_method">- (Object) <strong>git_index</strong> </a>
160
+
161
+ </span>
162
+
163
+
164
+
165
+
166
+
167
+
168
+ <span class="summary_desc"></span>
169
+
170
+ </li>
171
+
172
+
173
+ <li class="public ">
174
+ <span class="summary_signature"><a title="#initialize (instance method)" href="#initialize-instance_method">- (Base) <strong>initialize</strong>(new_path) </a>
175
+
176
+ </span>
177
+
178
+
179
+
180
+
181
+
182
+
183
+ <span class="summary_desc">
184
+ A new instance of <tt>Base</tt>.
185
+
186
+ </span>
187
+
188
+ </li>
189
+
190
+
191
+ <li class="public ">
192
+ <span class="summary_signature"><a title="#move_content_to (instance method)" href="#move_content_to-instance_method">- (Object) <strong>move_content_to</strong>(target_path) </a>
193
+
194
+ </span>
195
+
196
+
197
+
198
+
199
+
200
+
201
+ <span class="summary_desc"></span>
202
+
203
+ </li>
204
+
205
+
206
+ <li class="public ">
207
+ <span class="summary_signature"><a title="#name (instance method)" href="#name-instance_method">- (Object) <strong>name</strong> </a>
208
+
209
+ </span>
210
+
211
+
212
+
213
+
214
+
215
+
216
+ <span class="summary_desc"></span>
217
+
218
+ </li>
219
+
220
+
221
+ <li class="public ">
222
+ <span class="summary_signature"><a title="#parent (instance method)" href="#parent-instance_method">- (Object) <strong>parent</strong> </a>
223
+
224
+ </span>
225
+
226
+
227
+
228
+
229
+
230
+
231
+ <span class="summary_desc"></span>
232
+
233
+ </li>
234
+
235
+
236
+ <li class="public ">
237
+ <span class="summary_signature"><a title="#to_s (instance method)" href="#to_s-instance_method">- (Object) <strong>to_s</strong> </a>
238
+
239
+ </span>
240
+
241
+
242
+
243
+
244
+
245
+
246
+ <span class="summary_desc"></span>
247
+
248
+ </li>
249
+
250
+
251
+ </ul>
252
+
253
+ <div id="constructor_details">
254
+ <h2>Constructor Details</h2>
255
+
256
+ <div class="method_details first">
257
+ <p class="signature first" id="initialize-instance_method">
258
+
259
+ - (<tt><a title="Base" href="">Base</a></tt>) <strong>initialize</strong>(new_path)
260
+
261
+
262
+
263
+ </p><div class="docstring">
264
+ <div class="discussion">
265
+ <p>
266
+ A new instance of <tt>Base</tt>
267
+ </p>
268
+
269
+
270
+ </div>
271
+ </div>
272
+ <div class="tags">
273
+ <h3>Returns:</h3>
274
+ <ul class="return">
275
+
276
+ <li>
277
+
278
+ <span class='type'>(<tt><a title="Base" href="">Base</a></tt>)</span>
279
+
280
+
281
+
282
+
283
+ &mdash;
284
+
285
+ a new instance of <tt>Base</tt>
286
+
287
+
288
+
289
+ </li>
290
+
291
+ </ul>
292
+
293
+ </div><table class="source_code">
294
+ <tr>
295
+ <td>
296
+ <pre class="lines">
297
+
298
+
299
+ 9
300
+ 10
301
+ 11</pre>
302
+ </td>
303
+ <td>
304
+ <pre class="code"><span class="info file"># File 'lib/reflection/directory/base.rb', line 9</span>
305
+
306
+ <span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='new_path identifier id'>new_path</span><span class='rparen token'>)</span>
307
+ <span class='self self kw'>self</span><span class='dot token'>.</span><span class='path identifier id'>path</span> <span class='assign token'>=</span> <span class='new_path identifier id'>new_path</span>
308
+ <span class='end end kw'>end</span>
309
+ </pre>
310
+ </td>
311
+ </tr>
312
+ </table>
313
+ </div>
314
+
315
+ </div>
316
+
317
+ <div id="attr_details">
318
+ <h2>Attribute Details</h2>
319
+
320
+
321
+ <span id="path=-instance_method"></span>
322
+ <span id="path-instance_method"></span>
323
+ <div class="method_details first">
324
+ <p class="signature first" id="path-instance_method">
325
+
326
+ - (<tt>Object</tt>) <strong>path</strong>
327
+
328
+
329
+
330
+ </p><div class="docstring">
331
+ <div class="discussion">
332
+ <p>
333
+ Returns the value of attribute <tt>path</tt>
334
+ </p>
335
+
336
+
337
+ </div>
338
+ </div>
339
+ <div class="tags">
340
+
341
+ </div><table class="source_code">
342
+ <tr>
343
+ <td>
344
+ <pre class="lines">
345
+
346
+
347
+ 7
348
+ 8
349
+ 9</pre>
350
+ </td>
351
+ <td>
352
+ <pre class="code"><span class="info file"># File 'lib/reflection/directory/base.rb', line 7</span>
353
+
354
+ <span class='def def kw'>def</span> <span class='path identifier id'>path</span>
355
+ <span class='@path ivar id'>@path</span>
356
+ <span class='end end kw'>end</span>
357
+ </pre>
358
+ </td>
359
+ </tr>
360
+ </table>
361
+ </div>
362
+
363
+ </div>
364
+
365
+
366
+ <div id="method_details">
367
+ <h2>Method Details</h2>
368
+
369
+ <div class="method_details first">
370
+ <p class="signature first" id="clean!-instance_method">
371
+
372
+ - (<tt>Object</tt>) <strong>clean!</strong>
373
+
374
+
375
+
376
+ </p><table class="source_code">
377
+ <tr>
378
+ <td>
379
+ <pre class="lines">
380
+
381
+
382
+ 21
383
+ 22
384
+ 23
385
+ 24</pre>
386
+ </td>
387
+ <td>
388
+ <pre class="code"><span class="info file"># File 'lib/reflection/directory/base.rb', line 21</span>
389
+
390
+ <span class='def def kw'>def</span> <span class='clean! fid id'>clean!</span>
391
+ <span class='Reflection constant id'>Reflection</span><span class='dot token'>.</span><span class='log identifier id'>log</span><span class='dot token'>.</span><span class='debug identifier id'>debug</span> <span class='dstring node'>&quot;Cleaning #{self.path}/..&quot;</span>
392
+ <span class='dxstring node'>%x(rm -r #{self.path}/*)</span>
393
+ <span class='end end kw'>end</span>
394
+ </pre>
395
+ </td>
396
+ </tr>
397
+ </table>
398
+ </div>
399
+
400
+ <div class="method_details ">
401
+ <p class="signature " id="copy_git_index_to-instance_method">
402
+
403
+ - (<tt>Object</tt>) <strong>copy_git_index_to</strong>(target_path)
404
+
405
+
406
+
407
+ </p><table class="source_code">
408
+ <tr>
409
+ <td>
410
+ <pre class="lines">
411
+
412
+
413
+ 38
414
+ 39
415
+ 40
416
+ 41</pre>
417
+ </td>
418
+ <td>
419
+ <pre class="code"><span class="info file"># File 'lib/reflection/directory/base.rb', line 38</span>
420
+
421
+ <span class='def def kw'>def</span> <span class='copy_git_index_to identifier id'>copy_git_index_to</span><span class='lparen token'>(</span><span class='target_path identifier id'>target_path</span><span class='rparen token'>)</span>
422
+ <span class='Reflection constant id'>Reflection</span><span class='dot token'>.</span><span class='log identifier id'>log</span><span class='dot token'>.</span><span class='debug identifier id'>debug</span> <span class='dstring node'>&quot;Copying git-index '#{self.git_index}' to #{target_path}&quot;</span>
423
+ <span class='FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='cp_r identifier id'>cp_r</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='git_index identifier id'>git_index</span><span class='comma token'>,</span> <span class='target_path identifier id'>target_path</span><span class='rparen token'>)</span>
424
+ <span class='end end kw'>end</span>
425
+ </pre>
426
+ </td>
427
+ </tr>
428
+ </table>
429
+ </div>
430
+
431
+ <div class="method_details ">
432
+ <p class="signature " id="exists?-instance_method">
433
+
434
+ - (<tt>Object</tt>) <strong>exists?</strong>
435
+
436
+
437
+
438
+ </p><table class="source_code">
439
+ <tr>
440
+ <td>
441
+ <pre class="lines">
442
+
443
+
444
+ 17
445
+ 18
446
+ 19</pre>
447
+ </td>
448
+ <td>
449
+ <pre class="code"><span class="info file"># File 'lib/reflection/directory/base.rb', line 17</span>
450
+
451
+ <span class='def def kw'>def</span> <span class='exists? fid id'>exists?</span>
452
+ <span class='File constant id'>File</span><span class='dot token'>.</span><span class='exist? fid id'>exist?</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='path identifier id'>path</span><span class='rparen token'>)</span>
453
+ <span class='end end kw'>end</span>
454
+ </pre>
455
+ </td>
456
+ </tr>
457
+ </table>
458
+ </div>
459
+
460
+ <div class="method_details ">
461
+ <p class="signature " id="get_git_index_from-instance_method">
462
+
463
+ - (<tt>Object</tt>) <strong>get_git_index_from</strong>(target_path)
464
+
465
+
466
+
467
+ </p><table class="source_code">
468
+ <tr>
469
+ <td>
470
+ <pre class="lines">
471
+
472
+
473
+ 43
474
+ 44
475
+ 45
476
+ 46
477
+ 47
478
+ 48
479
+ 49</pre>
480
+ </td>
481
+ <td>
482
+ <pre class="code"><span class="info file"># File 'lib/reflection/directory/base.rb', line 43</span>
483
+
484
+ <span class='def def kw'>def</span> <span class='get_git_index_from identifier id'>get_git_index_from</span><span class='lparen token'>(</span><span class='target_path identifier id'>target_path</span><span class='rparen token'>)</span>
485
+ <span class='Reflection constant id'>Reflection</span><span class='dot token'>.</span><span class='log identifier id'>log</span><span class='dot token'>.</span><span class='debug identifier id'>debug</span> <span class='dstring node'>&quot;Getting git-index from #{target_path}&quot;</span>
486
+
487
+ <span class='dxstring node'>%x(rm -rf #{self.git_index})</span> <span class='if if_mod kw'>if</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='exists? fid id'>exists?</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='git_index identifier id'>git_index</span><span class='rparen token'>)</span>
488
+ <span class='dxstring node'>%x(mkdir -p #{self.path})</span>
489
+ <span class='dxstring node'>%x(mv -f #{File.join(target_path, '/.git')} #{File.join(self.path, &quot;/&quot;)})</span>
490
+ <span class='end end kw'>end</span>
491
+ </pre>
492
+ </td>
493
+ </tr>
494
+ </table>
495
+ </div>
496
+
497
+ <div class="method_details ">
498
+ <p class="signature " id="git_index-instance_method">
499
+
500
+ - (<tt>Object</tt>) <strong>git_index</strong>
501
+
502
+
503
+
504
+ </p><table class="source_code">
505
+ <tr>
506
+ <td>
507
+ <pre class="lines">
508
+
509
+
510
+ 34
511
+ 35
512
+ 36</pre>
513
+ </td>
514
+ <td>
515
+ <pre class="code"><span class="info file"># File 'lib/reflection/directory/base.rb', line 34</span>
516
+
517
+ <span class='def def kw'>def</span> <span class='git_index identifier id'>git_index</span>
518
+ <span class='File constant id'>File</span><span class='dot token'>.</span><span class='expand_path identifier id'>expand_path</span><span class='lparen token'>(</span><span class='File constant id'>File</span><span class='dot token'>.</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='path identifier id'>path</span><span class='comma token'>,</span> <span class='string val'>'.git'</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
519
+ <span class='end end kw'>end</span>
520
+ </pre>
521
+ </td>
522
+ </tr>
523
+ </table>
524
+ </div>
525
+
526
+ <div class="method_details ">
527
+ <p class="signature " id="move_content_to-instance_method">
528
+
529
+ - (<tt>Object</tt>) <strong>move_content_to</strong>(target_path)
530
+
531
+
532
+
533
+ </p><table class="source_code">
534
+ <tr>
535
+ <td>
536
+ <pre class="lines">
537
+
538
+
539
+ 51
540
+ 52
541
+ 53
542
+ 54
543
+ 55</pre>
544
+ </td>
545
+ <td>
546
+ <pre class="code"><span class="info file"># File 'lib/reflection/directory/base.rb', line 51</span>
547
+
548
+ <span class='def def kw'>def</span> <span class='move_content_to identifier id'>move_content_to</span><span class='lparen token'>(</span><span class='target_path identifier id'>target_path</span><span class='rparen token'>)</span>
549
+ <span class='Reflection constant id'>Reflection</span><span class='dot token'>.</span><span class='log identifier id'>log</span><span class='dot token'>.</span><span class='debug identifier id'>debug</span> <span class='dstring node'>&quot;Moving content to '#{target_path}'..&quot;</span>
550
+ <span class='FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='cp_r identifier id'>cp_r</span><span class='lparen token'>(</span><span class='File constant id'>File</span><span class='dot token'>.</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='path identifier id'>path</span><span class='comma token'>,</span> <span class='string val'>'/.'</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='target_path identifier id'>target_path</span><span class='rparen token'>)</span>
551
+ <span class='FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='rm_r identifier id'>rm_r</span><span class='lparen token'>(</span><span class='File constant id'>File</span><span class='dot token'>.</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='path identifier id'>path</span><span class='comma token'>,</span> <span class='string val'>'/'</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
552
+ <span class='end end kw'>end</span>
553
+ </pre>
554
+ </td>
555
+ </tr>
556
+ </table>
557
+ </div>
558
+
559
+ <div class="method_details ">
560
+ <p class="signature " id="name-instance_method">
561
+
562
+ - (<tt>Object</tt>) <strong>name</strong>
563
+
564
+
565
+
566
+ </p><table class="source_code">
567
+ <tr>
568
+ <td>
569
+ <pre class="lines">
570
+
571
+
572
+ 30
573
+ 31
574
+ 32</pre>
575
+ </td>
576
+ <td>
577
+ <pre class="code"><span class="info file"># File 'lib/reflection/directory/base.rb', line 30</span>
578
+
579
+ <span class='def def kw'>def</span> <span class='name identifier id'>name</span>
580
+ <span class='self self kw'>self</span><span class='dot token'>.</span><span class='path identifier id'>path</span><span class='dot token'>.</span><span class='split identifier id'>split</span><span class='lparen token'>(</span><span class='string val'>'/'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='last identifier id'>last</span>
581
+ <span class='end end kw'>end</span>
582
+ </pre>
583
+ </td>
584
+ </tr>
585
+ </table>
586
+ </div>
587
+
588
+ <div class="method_details ">
589
+ <p class="signature " id="parent-instance_method">
590
+
591
+ - (<tt>Object</tt>) <strong>parent</strong>
592
+
593
+
594
+
595
+ </p><table class="source_code">
596
+ <tr>
597
+ <td>
598
+ <pre class="lines">
599
+
600
+
601
+ 26
602
+ 27
603
+ 28</pre>
604
+ </td>
605
+ <td>
606
+ <pre class="code"><span class="info file"># File 'lib/reflection/directory/base.rb', line 26</span>
607
+
608
+ <span class='def def kw'>def</span> <span class='parent identifier id'>parent</span>
609
+ <span class='Base constant id'>Base</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='File constant id'>File</span><span class='dot token'>.</span><span class='expand_path identifier id'>expand_path</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='path identifier id'>path</span><span class='dot token'>.</span><span class='split identifier id'>split</span><span class='lparen token'>(</span><span class='string val'>'/'</span><span class='rparen token'>)</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='dot2 op'>..</span><span class='integer val'>-2</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='string val'>'/'</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
610
+ <span class='end end kw'>end</span>
611
+ </pre>
612
+ </td>
613
+ </tr>
614
+ </table>
615
+ </div>
616
+
617
+ <div class="method_details ">
618
+ <p class="signature " id="to_s-instance_method">
619
+
620
+ - (<tt>Object</tt>) <strong>to_s</strong>
621
+
622
+
623
+
624
+ </p><table class="source_code">
625
+ <tr>
626
+ <td>
627
+ <pre class="lines">
628
+
629
+
630
+ 13
631
+ 14
632
+ 15</pre>
633
+ </td>
634
+ <td>
635
+ <pre class="code"><span class="info file"># File 'lib/reflection/directory/base.rb', line 13</span>
636
+
637
+ <span class='def def kw'>def</span> <span class='to_s identifier id'>to_s</span>
638
+ <span class='self self kw'>self</span><span class='dot token'>.</span><span class='path identifier id'>path</span>
639
+ <span class='end end kw'>end</span>
640
+ </pre>
641
+ </td>
642
+ </tr>
643
+ </table>
644
+ </div>
645
+
646
+ </div>
647
+
648
+ </div>
649
+
650
+ <div id="footer">
651
+ Generated on Wed Nov 18 18:17:11 2009 by
652
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
653
+ 0.4.0 (ruby-1.8.7).
654
+ </div>
655
+
656
+ </body>
657
+ </html>