naether 0.8.6 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,490 @@
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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Naether::Configurator
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (C)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Naether.html" title="Naether (class)">Naether</a></span></span>
36
+ &raquo;
37
+ <span class="title">Configurator</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ 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
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Naether::Configurator
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Naether::Configurator</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/naether/configuration.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>
111
+ Instance Method Summary
112
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
113
+ </h2>
114
+
115
+ <ul class="summary">
116
+
117
+ <li class="public ">
118
+ <span class="summary_signature">
119
+
120
+ <a href="#%5B%5D-instance_method" title="#[] (instance method)">- (Object) <strong>[]</strong>(key) </a>
121
+
122
+
123
+
124
+ </span>
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+ <span class="summary_desc"><div class='inline'></div></span>
135
+
136
+ </li>
137
+
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#%5B%5D%3D-instance_method" title="#[]= (instance method)">- (Object) <strong>[]=</strong>(key, value) </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'></div></span>
157
+
158
+ </li>
159
+
160
+
161
+ <li class="public ">
162
+ <span class="summary_signature">
163
+
164
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Configurator) <strong>initialize</strong>(data = {}) </a>
165
+
166
+
167
+
168
+ </span>
169
+
170
+
171
+ <span class="note title constructor">constructor</span>
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+ <span class="summary_desc"><div class='inline'>
181
+ <p>A new instance of Configurator.</p>
182
+ </div></span>
183
+
184
+ </li>
185
+
186
+
187
+ <li class="public ">
188
+ <span class="summary_signature">
189
+
190
+ <a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(sym, *args) </a>
191
+
192
+
193
+
194
+ </span>
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+ <span class="summary_desc"><div class='inline'></div></span>
205
+
206
+ </li>
207
+
208
+
209
+ <li class="public ">
210
+ <span class="summary_signature">
211
+
212
+ <a href="#update%21-instance_method" title="#update! (instance method)">- (Object) <strong>update!</strong>(data) </a>
213
+
214
+
215
+
216
+ </span>
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+ <span class="summary_desc"><div class='inline'></div></span>
227
+
228
+ </li>
229
+
230
+
231
+ </ul>
232
+
233
+
234
+ <div id="constructor_details" class="method_details_list">
235
+ <h2>Constructor Details</h2>
236
+
237
+ <div class="method_details first">
238
+ <h3 class="signature first" id="initialize-instance_method">
239
+
240
+ - (<tt><span class='object_link'><a href="" title="Naether::Configurator (class)">Configurator</a></span></tt>) <strong>initialize</strong>(data = {})
241
+
242
+
243
+
244
+
245
+
246
+ </h3><div class="docstring">
247
+ <div class="discussion">
248
+
249
+ <p>A new instance of Configurator</p>
250
+
251
+
252
+ </div>
253
+ </div>
254
+ <div class="tags">
255
+
256
+
257
+ </div><table class="source_code">
258
+ <tr>
259
+ <td>
260
+ <pre class="lines">
261
+
262
+
263
+ 4
264
+ 5
265
+ 6
266
+ 7
267
+ 8
268
+ 9
269
+ 10
270
+ 11
271
+ 12
272
+ 13
273
+ 14
274
+ 15
275
+ 16
276
+ 17
277
+ 18
278
+ 19
279
+ 20
280
+ 21
281
+ 22
282
+ 23
283
+ 24
284
+ 25
285
+ 26
286
+ 27
287
+ 28
288
+ 29</pre>
289
+ </td>
290
+ <td>
291
+ <pre class="code"><span class="info file"># File 'lib/naether/configuration.rb', line 4</span>
292
+
293
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
294
+ <span class='id identifier rubyid_gem_dir'>gem_dir</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>/../../</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
295
+
296
+ <span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='kw'>nil</span>
297
+
298
+ <span class='comment'># Load VERSION file from gem to VERSION var
299
+ </span> <span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>/../../VERSION</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='rparen'>)</span>
300
+ <span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='const'>IO</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>/../../VERSION</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span>
301
+
302
+ <span class='comment'># VERSION file not found in gem dir, assume in current path, e.g.running from checkout
303
+ </span> <span class='kw'>else</span>
304
+ <span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='const'>IO</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>VERSION</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span>
305
+ <span class='kw'>end</span>
306
+
307
+
308
+
309
+ <span class='ivar'>@data</span> <span class='op'>=</span> <span class='lbrace'>{</span>
310
+ <span class='symbol'>:gem_dir</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_gem_dir'>gem_dir</span><span class='comma'>,</span>
311
+ <span class='symbol'>:naether_jar</span> <span class='op'>=&gt;</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span> <span class='id identifier rubyid_gem_dir'>gem_dir</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>naether-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version'>version</span><span class='rbrace'>}</span><span class='tstring_content'>.jar</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='comma'>,</span>
312
+ <span class='symbol'>:platform</span> <span class='op'>=&gt;</span> <span class='lparen'>(</span><span class='gvar'>$platform</span> <span class='op'>||</span> <span class='const'>RUBY_PLATFORM</span><span class='lbracket'>[</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>java</span><span class='regexp_end'>/</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ruby</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span>
313
+ <span class='symbol'>:version</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_version'>version</span><span class='comma'>,</span>
314
+ <span class='symbol'>:depenencies_yml</span> <span class='op'>=&gt;</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span> <span class='kw'>__FILE__</span> <span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>/../../jar_dependencies.yml</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
315
+ <span class='rbrace'>}</span>
316
+
317
+ <span class='id identifier rubyid_update!'>update!</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
318
+ <span class='kw'>end</span></pre>
319
+ </td>
320
+ </tr>
321
+ </table>
322
+ </div>
323
+
324
+ </div>
325
+ <div id="method_missing_details" class="method_details_list">
326
+ <h2>Dynamic Method Handling</h2>
327
+ <p class="notice this">
328
+ This class handles dynamic methods through the <tt>method_missing</tt> method
329
+
330
+ </p>
331
+
332
+ <div class="method_details first">
333
+ <h3 class="signature first" id="method_missing-instance_method">
334
+
335
+ - (<tt>Object</tt>) <strong>method_missing</strong>(sym, *args)
336
+
337
+
338
+
339
+
340
+
341
+ </h3><table class="source_code">
342
+ <tr>
343
+ <td>
344
+ <pre class="lines">
345
+
346
+
347
+ 49
348
+ 50
349
+ 51
350
+ 52
351
+ 53
352
+ 54
353
+ 55</pre>
354
+ </td>
355
+ <td>
356
+ <pre class="code"><span class="info file"># File 'lib/naether/configuration.rb', line 49</span>
357
+
358
+ <span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_sym'>sym</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
359
+ <span class='kw'>if</span> <span class='id identifier rubyid_sym'>sym</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(.+)=$</span><span class='regexp_end'>/</span></span>
360
+ <span class='kw'>self</span><span class='lbracket'>[</span><span class='backref'>$1</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
361
+ <span class='kw'>else</span>
362
+ <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_sym'>sym</span><span class='rbracket'>]</span>
363
+ <span class='kw'>end</span>
364
+ <span class='kw'>end</span></pre>
365
+ </td>
366
+ </tr>
367
+ </table>
368
+ </div>
369
+
370
+ </div>
371
+
372
+
373
+ <div id="instance_method_details" class="method_details_list">
374
+ <h2>Instance Method Details</h2>
375
+
376
+
377
+ <div class="method_details first">
378
+ <h3 class="signature first" id="[]-instance_method">
379
+
380
+ - (<tt>Object</tt>) <strong>[]</strong>(key)
381
+
382
+
383
+
384
+
385
+
386
+ </h3><table class="source_code">
387
+ <tr>
388
+ <td>
389
+ <pre class="lines">
390
+
391
+
392
+ 37
393
+ 38
394
+ 39</pre>
395
+ </td>
396
+ <td>
397
+ <pre class="code"><span class="info file"># File 'lib/naether/configuration.rb', line 37</span>
398
+
399
+ <span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
400
+ <span class='ivar'>@data</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span>
401
+ <span class='kw'>end</span></pre>
402
+ </td>
403
+ </tr>
404
+ </table>
405
+ </div>
406
+
407
+ <div class="method_details ">
408
+ <h3 class="signature " id="[]=-instance_method">
409
+
410
+ - (<tt>Object</tt>) <strong>[]=</strong>(key, value)
411
+
412
+
413
+
414
+
415
+
416
+ </h3><table class="source_code">
417
+ <tr>
418
+ <td>
419
+ <pre class="lines">
420
+
421
+
422
+ 41
423
+ 42
424
+ 43
425
+ 44
426
+ 45
427
+ 46
428
+ 47</pre>
429
+ </td>
430
+ <td>
431
+ <pre class="code"><span class="info file"># File 'lib/naether/configuration.rb', line 41</span>
432
+
433
+ <span class='kw'>def</span> <span class='op'>[]=</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
434
+ <span class='kw'>if</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> <span class='op'>==</span> <span class='const'>Hash</span>
435
+ <span class='ivar'>@data</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Config</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
436
+ <span class='kw'>else</span>
437
+ <span class='ivar'>@data</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
438
+ <span class='kw'>end</span>
439
+ <span class='kw'>end</span></pre>
440
+ </td>
441
+ </tr>
442
+ </table>
443
+ </div>
444
+
445
+ <div class="method_details ">
446
+ <h3 class="signature " id="update!-instance_method">
447
+
448
+ - (<tt>Object</tt>) <strong>update!</strong>(data)
449
+
450
+
451
+
452
+
453
+
454
+ </h3><table class="source_code">
455
+ <tr>
456
+ <td>
457
+ <pre class="lines">
458
+
459
+
460
+ 31
461
+ 32
462
+ 33
463
+ 34
464
+ 35</pre>
465
+ </td>
466
+ <td>
467
+ <pre class="code"><span class="info file"># File 'lib/naether/configuration.rb', line 31</span>
468
+
469
+ <span class='kw'>def</span> <span class='id identifier rubyid_update!'>update!</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
470
+ <span class='id identifier rubyid_data'>data</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_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
471
+ <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
472
+ <span class='kw'>end</span>
473
+ <span class='kw'>end</span></pre>
474
+ </td>
475
+ </tr>
476
+ </table>
477
+ </div>
478
+
479
+ </div>
480
+
481
+ </div>
482
+
483
+ <div id="footer">
484
+ Generated on Wed Sep 12 14:18:13 2012 by
485
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
486
+ 0.8.2.1 (ruby-1.9.3).
487
+ </div>
488
+
489
+ </body>
490
+ </html>