mattock 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. data/doc/Specifications +0 -37
  2. data/lib/mattock/cascading-definition.rb +36 -0
  3. data/lib/mattock/configurable.rb +46 -5
  4. data/lib/mattock/tasklib.rb +47 -1
  5. data/lib/mattock/yard_extensions.rb +10 -0
  6. metadata +3 -213
  7. data/doc/FileSandbox.html +0 -537
  8. data/doc/FileSandbox/HaveContents.html +0 -279
  9. data/doc/FileSandbox/Sandbox.html +0 -525
  10. data/doc/FileSandbox/SandboxFile.html +0 -622
  11. data/doc/Mattock.html +0 -137
  12. data/doc/Mattock/CascadingDefinition.html +0 -459
  13. data/doc/Mattock/CommandChain.html +0 -456
  14. data/doc/Mattock/CommandLine.html +0 -1312
  15. data/doc/Mattock/CommandLineExampleGroup.html +0 -282
  16. data/doc/Mattock/CommandLineExampleGroup/Matchers.html +0 -109
  17. data/doc/Mattock/CommandRunResult.html +0 -643
  18. data/doc/Mattock/CommandTask.html +0 -464
  19. data/doc/Mattock/Configurable.html +0 -609
  20. data/doc/Mattock/Configurable/ClassMethods.html +0 -754
  21. data/doc/Mattock/Configurable/Struct.html +0 -148
  22. data/doc/Mattock/FileCreationTask.html +0 -177
  23. data/doc/Mattock/FileTask.html +0 -177
  24. data/doc/Mattock/MockCommandResult.html +0 -445
  25. data/doc/Mattock/MultiTask.html +0 -177
  26. data/doc/Mattock/PipelineChain.html +0 -221
  27. data/doc/Mattock/PrereqChain.html +0 -221
  28. data/doc/Mattock/RakeExampleGroup.html +0 -292
  29. data/doc/Mattock/RakeExampleGroup/Matchers.html +0 -109
  30. data/doc/Mattock/RakeExampleGroup/TaskManager.html +0 -131
  31. data/doc/Mattock/RemoteCommandTask.html +0 -423
  32. data/doc/Mattock/ShellEscaped.html +0 -315
  33. data/doc/Mattock/Task.html +0 -181
  34. data/doc/Mattock/TaskLib.html +0 -755
  35. data/doc/Mattock/TaskMixin.html +0 -668
  36. data/doc/Mattock/TaskMixin/ClassMethods.html +0 -166
  37. data/doc/Mattock/TemplateHost.html +0 -320
  38. data/doc/Mattock/ValiseManager.html +0 -257
  39. data/doc/Mattock/WrappingChain.html +0 -221
  40. data/doc/Mattock/YARDExtensions.html +0 -110
  41. data/doc/Mattock/YARDExtensions/DefineHandler.html +0 -253
  42. data/doc/Mattock/YARDExtensions/NilFieldsHandler.html +0 -258
  43. data/doc/Mattock/YARDExtensions/RequiredFieldsHandler.html +0 -205
  44. data/doc/Mattock/YARDExtensions/SettingHandler.html +0 -529
  45. data/doc/Mattock/YARDExtensions/SettingsHandler.html +0 -207
  46. data/doc/RSpecTest.html +0 -233
  47. data/doc/Ungemmer.html +0 -282
  48. data/doc/_index.html +0 -435
  49. data/doc/class_list.html +0 -47
  50. data/doc/coverage/assets/0.5.3/app.js +0 -88
  51. data/doc/coverage/assets/0.5.3/fancybox/blank.gif +0 -0
  52. data/doc/coverage/assets/0.5.3/fancybox/fancy_close.png +0 -0
  53. data/doc/coverage/assets/0.5.3/fancybox/fancy_loading.png +0 -0
  54. data/doc/coverage/assets/0.5.3/fancybox/fancy_nav_left.png +0 -0
  55. data/doc/coverage/assets/0.5.3/fancybox/fancy_nav_right.png +0 -0
  56. data/doc/coverage/assets/0.5.3/fancybox/fancy_shadow_e.png +0 -0
  57. data/doc/coverage/assets/0.5.3/fancybox/fancy_shadow_n.png +0 -0
  58. data/doc/coverage/assets/0.5.3/fancybox/fancy_shadow_ne.png +0 -0
  59. data/doc/coverage/assets/0.5.3/fancybox/fancy_shadow_nw.png +0 -0
  60. data/doc/coverage/assets/0.5.3/fancybox/fancy_shadow_s.png +0 -0
  61. data/doc/coverage/assets/0.5.3/fancybox/fancy_shadow_se.png +0 -0
  62. data/doc/coverage/assets/0.5.3/fancybox/fancy_shadow_sw.png +0 -0
  63. data/doc/coverage/assets/0.5.3/fancybox/fancy_shadow_w.png +0 -0
  64. data/doc/coverage/assets/0.5.3/fancybox/fancy_title_left.png +0 -0
  65. data/doc/coverage/assets/0.5.3/fancybox/fancy_title_main.png +0 -0
  66. data/doc/coverage/assets/0.5.3/fancybox/fancy_title_over.png +0 -0
  67. data/doc/coverage/assets/0.5.3/fancybox/fancy_title_right.png +0 -0
  68. data/doc/coverage/assets/0.5.3/fancybox/fancybox-x.png +0 -0
  69. data/doc/coverage/assets/0.5.3/fancybox/fancybox-y.png +0 -0
  70. data/doc/coverage/assets/0.5.3/fancybox/fancybox.png +0 -0
  71. data/doc/coverage/assets/0.5.3/fancybox/jquery.fancybox-1.3.1.css +0 -363
  72. data/doc/coverage/assets/0.5.3/fancybox/jquery.fancybox-1.3.1.pack.js +0 -44
  73. data/doc/coverage/assets/0.5.3/favicon_green.png +0 -0
  74. data/doc/coverage/assets/0.5.3/favicon_red.png +0 -0
  75. data/doc/coverage/assets/0.5.3/favicon_yellow.png +0 -0
  76. data/doc/coverage/assets/0.5.3/highlight.css +0 -129
  77. data/doc/coverage/assets/0.5.3/highlight.pack.js +0 -1
  78. data/doc/coverage/assets/0.5.3/jquery-1.6.2.min.js +0 -18
  79. data/doc/coverage/assets/0.5.3/jquery.dataTables.min.js +0 -152
  80. data/doc/coverage/assets/0.5.3/jquery.timeago.js +0 -141
  81. data/doc/coverage/assets/0.5.3/jquery.url.js +0 -174
  82. data/doc/coverage/assets/0.5.3/loading.gif +0 -0
  83. data/doc/coverage/assets/0.5.3/magnify.png +0 -0
  84. data/doc/coverage/assets/0.5.3/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  85. data/doc/coverage/assets/0.5.3/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  86. data/doc/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  87. data/doc/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  88. data/doc/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  89. data/doc/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  90. data/doc/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  91. data/doc/coverage/assets/0.5.3/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  92. data/doc/coverage/assets/0.5.3/smoothness/images/ui-icons_222222_256x240.png +0 -0
  93. data/doc/coverage/assets/0.5.3/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  94. data/doc/coverage/assets/0.5.3/smoothness/images/ui-icons_454545_256x240.png +0 -0
  95. data/doc/coverage/assets/0.5.3/smoothness/images/ui-icons_888888_256x240.png +0 -0
  96. data/doc/coverage/assets/0.5.3/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  97. data/doc/coverage/assets/0.5.3/smoothness/jquery-ui-1.8.4.custom.css +0 -295
  98. data/doc/coverage/assets/0.5.3/stylesheet.css +0 -383
  99. data/doc/coverage/index.html +0 -5169
  100. data/doc/css/common.css +0 -1
  101. data/doc/css/full_list.css +0 -55
  102. data/doc/css/style.css +0 -322
  103. data/doc/file.README.html +0 -107
  104. data/doc/file_list.html +0 -49
  105. data/doc/frames.html +0 -13
  106. data/doc/index.html +0 -107
  107. data/doc/js/app.js +0 -205
  108. data/doc/js/full_list.js +0 -173
  109. data/doc/js/jquery.js +0 -16
  110. data/doc/method_list.html +0 -950
  111. data/doc/top-level-namespace.html +0 -107
@@ -1,754 +0,0 @@
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
- Module: Mattock::Configurable::ClassMethods
8
-
9
- &mdash; Documentation by YARD 0.7.5
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
- relpath = '../..';
19
- if (relpath != '') relpath += '/';
20
- </script>
21
-
22
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
23
-
24
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
25
-
26
-
27
- </head>
28
- <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
- <div id="header">
34
- <div id="menu">
35
-
36
- <a href="../../_index.html">Index (C)</a> &raquo;
37
- <span class='title'><span class='object_link'><a href="../../Mattock.html" title="Mattock (module)">Mattock</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Configurable.html" title="Mattock::Configurable (module)">Configurable</a></span></span>
38
- &raquo;
39
- <span class="title">ClassMethods</span>
40
-
41
-
42
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
- </div>
44
-
45
- <div id="search">
46
-
47
- <a id="class_list_link" href="#">Class List</a>
48
-
49
- <a id="method_list_link" href="#">Method List</a>
50
-
51
- <a id="file_list_link" href="#">File List</a>
52
-
53
- </div>
54
- <div class="clear"></div>
55
- </div>
56
-
57
- <iframe id="search_frame"></iframe>
58
-
59
- <div id="content"><h1>Module: Mattock::Configurable::ClassMethods
60
-
61
-
62
-
63
- </h1>
64
-
65
- <dl class="box">
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
- <dt class="r1">Included in:</dt>
74
- <dd class="r1"><span class='object_link'><a href="../Configurable.html" title="Mattock::Configurable (module)">Mattock::Configurable</a></span></dd>
75
-
76
-
77
-
78
- <dt class="r2 last">Defined in:</dt>
79
- <dd class="r2 last">lib/mattock/configurable.rb</dd>
80
-
81
- </dl>
82
- <div class="clear"></div>
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
- <h2>
95
- Instance Method Summary
96
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
97
- </h2>
98
-
99
- <ul class="summary">
100
-
101
- <li class="public ">
102
- <span class="summary_signature">
103
-
104
- <a href="#copy_settings-instance_method" title="#copy_settings (instance method)">- (Object) <strong>copy_settings</strong>(from, to) </a>
105
-
106
-
107
-
108
- </span>
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
- <span class="summary_desc"><div class='inline'></div></span>
118
-
119
- </li>
120
-
121
-
122
- <li class="public ">
123
- <span class="summary_signature">
124
-
125
- <a href="#default_values-instance_method" title="#default_values (instance method)">- (Object) <strong>default_values</strong> </a>
126
-
127
-
128
-
129
- </span>
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
- <span class="summary_desc"><div class='inline'></div></span>
139
-
140
- </li>
141
-
142
-
143
- <li class="public ">
144
- <span class="summary_signature">
145
-
146
- <a href="#included-instance_method" title="#included (instance method)">- (Object) <strong>included</strong>(mod) </a>
147
-
148
-
149
-
150
- </span>
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
- <span class="summary_desc"><div class='inline'></div></span>
160
-
161
- </li>
162
-
163
-
164
- <li class="public ">
165
- <span class="summary_signature">
166
-
167
- <a href="#missing_required_fields_on-instance_method" title="#missing_required_fields_on (instance method)">- (Object) <strong>missing_required_fields_on</strong>(instance) </a>
168
-
169
-
170
-
171
- </span>
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
- <span class="summary_desc"><div class='inline'></div></span>
181
-
182
- </li>
183
-
184
-
185
- <li class="public ">
186
- <span class="summary_signature">
187
-
188
- <a href="#nested-instance_method" title="#nested (instance method)">- (Object) <strong>nested</strong>(hash = nil) </a>
189
-
190
-
191
-
192
- </span>
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
- <span class="summary_desc"><div class='inline'></div></span>
202
-
203
- </li>
204
-
205
-
206
- <li class="public ">
207
- <span class="summary_signature">
208
-
209
- <a href="#nil_fields-instance_method" title="#nil_fields (instance method)">- (Object) <strong>nil_fields</strong>(*names) </a>
210
-
211
-
212
-
213
- (also: #nil_field)
214
-
215
- </span>
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
- <span class="summary_desc"><div class='inline'></div></span>
225
-
226
- </li>
227
-
228
-
229
- <li class="public ">
230
- <span class="summary_signature">
231
-
232
- <a href="#required_fields-instance_method" title="#required_fields (instance method)">- (Object) <strong>required_fields</strong>(*names) </a>
233
-
234
-
235
-
236
- (also: #required_field)
237
-
238
- </span>
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
-
247
- <span class="summary_desc"><div class='inline'></div></span>
248
-
249
- </li>
250
-
251
-
252
- <li class="public ">
253
- <span class="summary_signature">
254
-
255
- <a href="#set_defaults_on-instance_method" title="#set_defaults_on (instance method)">- (Object) <strong>set_defaults_on</strong>(instance) </a>
256
-
257
-
258
-
259
- </span>
260
-
261
-
262
-
263
-
264
-
265
-
266
-
267
-
268
- <span class="summary_desc"><div class='inline'></div></span>
269
-
270
- </li>
271
-
272
-
273
- <li class="public ">
274
- <span class="summary_signature">
275
-
276
- <a href="#setting-instance_method" title="#setting (instance method)">- (Object) <strong>setting</strong>(name, default_value = RequiredField) </a>
277
-
278
-
279
-
280
- </span>
281
-
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
- <span class="summary_desc"><div class='inline'><dl class="rdoc-list label-list"><dt>
290
- <dd>
291
- <p>The default value of.</p>
292
- </dd></dl>
293
- </div></span>
294
-
295
- </li>
296
-
297
-
298
- <li class="public ">
299
- <span class="summary_signature">
300
-
301
- <a href="#settings-instance_method" title="#settings (instance method)">- (Object) <strong>settings</strong>(hash) </a>
302
-
303
-
304
-
305
- </span>
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
-
314
- <span class="summary_desc"><div class='inline'></div></span>
315
-
316
- </li>
317
-
318
-
319
- </ul>
320
-
321
-
322
-
323
-
324
- <div id="instance_method_details" class="method_details_list">
325
- <h2>Instance Method Details</h2>
326
-
327
-
328
- <div class="method_details first">
329
- <p class="signature first" id="copy_settings-instance_method">
330
-
331
- - (<tt>Object</tt>) <strong>copy_settings</strong>(from, to)
332
-
333
-
334
-
335
- </p><table class="source_code">
336
- <tr>
337
- <td>
338
- <pre class="lines">
339
-
340
-
341
- 53
342
- 54
343
- 55
344
- 56
345
- 57
346
- 58
347
- 59
348
- 60
349
- 61
350
- 62
351
- 63
352
- 64</pre>
353
- </td>
354
- <td>
355
- <pre class="code"><span class="info file"># File 'lib/mattock/configurable.rb', line 53</span>
356
-
357
- <span class='kw'>def</span> <span class='id identifier rubyid_copy_settings'>copy_settings</span><span class='lparen'>(</span><span class='id identifier rubyid_from'>from</span><span class='comma'>,</span> <span class='id identifier rubyid_to'>to</span><span class='rparen'>)</span>
358
- <span class='kw'>if</span> <span class='const'>Configurable</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_superclass'>superclass</span>
359
- <span class='id identifier rubyid_superclass'>superclass</span><span class='period'>.</span><span class='id identifier rubyid_copy_settings'>copy_settings</span><span class='lparen'>(</span><span class='id identifier rubyid_from'>from</span><span class='comma'>,</span> <span class='id identifier rubyid_to'>to</span><span class='rparen'>)</span>
360
- <span class='kw'>end</span>
361
- <span class='id identifier rubyid_default_values'>default_values</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</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_field'>field</span><span class='op'>|</span>
362
- <span class='kw'>begin</span>
363
- <span class='id identifier rubyid_to'>to</span><span class='period'>.</span><span class='id identifier rubyid___send__'>__send__</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_field'>field</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_from'>from</span><span class='period'>.</span><span class='id identifier rubyid___send__'>__send__</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span><span class='rparen'>)</span>
364
- <span class='kw'>rescue</span> <span class='const'>NoMethodError</span>
365
- <span class='comment'>#shrug it off
366
- </span> <span class='kw'>end</span>
367
- <span class='kw'>end</span>
368
- <span class='kw'>end</span></pre>
369
- </td>
370
- </tr>
371
- </table>
372
- </div>
373
-
374
- <div class="method_details ">
375
- <p class="signature " id="default_values-instance_method">
376
-
377
- - (<tt>Object</tt>) <strong>default_values</strong>
378
-
379
-
380
-
381
- </p><table class="source_code">
382
- <tr>
383
- <td>
384
- <pre class="lines">
385
-
386
-
387
- 17
388
- 18
389
- 19</pre>
390
- </td>
391
- <td>
392
- <pre class="code"><span class="info file"># File 'lib/mattock/configurable.rb', line 17</span>
393
-
394
- <span class='kw'>def</span> <span class='id identifier rubyid_default_values'>default_values</span>
395
- <span class='ivar'>@default_values</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
396
- <span class='kw'>end</span></pre>
397
- </td>
398
- </tr>
399
- </table>
400
- </div>
401
-
402
- <div class="method_details ">
403
- <p class="signature " id="included-instance_method">
404
-
405
- - (<tt>Object</tt>) <strong>included</strong>(mod)
406
-
407
-
408
-
409
- </p><table class="source_code">
410
- <tr>
411
- <td>
412
- <pre class="lines">
413
-
414
-
415
- 106
416
- 107
417
- 108</pre>
418
- </td>
419
- <td>
420
- <pre class="code"><span class="info file"># File 'lib/mattock/configurable.rb', line 106</span>
421
-
422
- <span class='kw'>def</span> <span class='id identifier rubyid_included'>included</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
423
- <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_extend'>extend</span> <span class='const'>ClassMethods</span>
424
- <span class='kw'>end</span></pre>
425
- </td>
426
- </tr>
427
- </table>
428
- </div>
429
-
430
- <div class="method_details ">
431
- <p class="signature " id="missing_required_fields_on-instance_method">
432
-
433
- - (<tt>Object</tt>) <strong>missing_required_fields_on</strong>(instance)
434
-
435
-
436
-
437
- </p><table class="source_code">
438
- <tr>
439
- <td>
440
- <pre class="lines">
441
-
442
-
443
- 33
444
- 34
445
- 35
446
- 36
447
- 37
448
- 38
449
- 39
450
- 40
451
- 41
452
- 42
453
- 43
454
- 44
455
- 45
456
- 46
457
- 47
458
- 48
459
- 49
460
- 50
461
- 51</pre>
462
- </td>
463
- <td>
464
- <pre class="code"><span class="info file"># File 'lib/mattock/configurable.rb', line 33</span>
465
-
466
- <span class='kw'>def</span> <span class='id identifier rubyid_missing_required_fields_on'>missing_required_fields_on</span><span class='lparen'>(</span><span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span>
467
- <span class='id identifier rubyid_missing'>missing</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
468
- <span class='kw'>if</span> <span class='const'>Configurable</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_superclass'>superclass</span>
469
- <span class='id identifier rubyid_missing'>missing</span> <span class='op'>=</span> <span class='id identifier rubyid_superclass'>superclass</span><span class='period'>.</span><span class='id identifier rubyid_missing_required_fields_on'>missing_required_fields_on</span><span class='lparen'>(</span><span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span>
470
- <span class='kw'>end</span>
471
- <span class='id identifier rubyid_default_values'>default_values</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span><span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
472
- <span class='id identifier rubyid_set_value'>set_value</span> <span class='op'>=</span> <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid___send__'>__send__</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
473
- <span class='kw'>if</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>==</span> <span class='const'>RequiredField</span> <span class='kw'>and</span> <span class='id identifier rubyid_set_value'>set_value</span> <span class='op'>==</span> <span class='const'>RequiredField</span>
474
- <span class='id identifier rubyid_missing'>missing</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_name'>name</span>
475
- <span class='kw'>next</span>
476
- <span class='kw'>end</span>
477
- <span class='kw'>if</span> <span class='const'>Configurable</span> <span class='op'>===</span> <span class='id identifier rubyid_set_value'>set_value</span>
478
- <span class='id identifier rubyid_missing'>missing</span> <span class='op'>+=</span> <span class='id identifier rubyid_set_value'>set_value</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_missing_required_fields_on'>missing_required_fields_on</span><span class='lparen'>(</span><span class='id identifier rubyid_set_value'>set_value</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_field'>field</span><span class='op'>|</span>
479
- <span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_field'>field</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'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
480
- <span class='kw'>end</span>
481
- <span class='kw'>end</span>
482
- <span class='kw'>end</span>
483
- <span class='kw'>return</span> <span class='id identifier rubyid_missing'>missing</span>
484
- <span class='kw'>end</span></pre>
485
- </td>
486
- </tr>
487
- </table>
488
- </div>
489
-
490
- <div class="method_details ">
491
- <p class="signature " id="nested-instance_method">
492
-
493
- - (<tt>Object</tt>) <strong>nested</strong>(hash = nil)
494
-
495
-
496
-
497
- </p><table class="source_code">
498
- <tr>
499
- <td>
500
- <pre class="lines">
501
-
502
-
503
- 66
504
- 67
505
- 68
506
- 69
507
- 70</pre>
508
- </td>
509
- <td>
510
- <pre class="code"><span class="info file"># File 'lib/mattock/configurable.rb', line 66</span>
511
-
512
- <span class='kw'>def</span> <span class='id identifier rubyid_nested'>nested</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
513
- <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='const'>Class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>Struct</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
514
- <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span> <span class='op'>||</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
515
- <span class='kw'>return</span> <span class='id identifier rubyid_obj'>obj</span>
516
- <span class='kw'>end</span></pre>
517
- </td>
518
- </tr>
519
- </table>
520
- </div>
521
-
522
- <div class="method_details ">
523
- <p class="signature " id="nil_fields-instance_method">
524
-
525
- - (<tt>Object</tt>) <strong>nil_fields</strong>(*names)
526
-
527
-
528
-
529
- <span class="aliases">Also known as:
530
- <span class="names"><span id='nil_field-instance_method'>nil_field</span></span>
531
- </span>
532
-
533
- </p><table class="source_code">
534
- <tr>
535
- <td>
536
- <pre class="lines">
537
-
538
-
539
- 72
540
- 73
541
- 74
542
- 75
543
- 76</pre>
544
- </td>
545
- <td>
546
- <pre class="code"><span class="info file"># File 'lib/mattock/configurable.rb', line 72</span>
547
-
548
- <span class='kw'>def</span> <span class='id identifier rubyid_nil_fields'>nil_fields</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_names'>names</span><span class='rparen'>)</span>
549
- <span class='id identifier rubyid_names'>names</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_name'>name</span><span class='op'>|</span>
550
- <span class='id identifier rubyid_setting'>setting</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>
551
- <span class='kw'>end</span>
552
- <span class='kw'>end</span></pre>
553
- </td>
554
- </tr>
555
- </table>
556
- </div>
557
-
558
- <div class="method_details ">
559
- <p class="signature " id="required_fields-instance_method">
560
-
561
- - (<tt>Object</tt>) <strong>required_fields</strong>(*names)
562
-
563
-
564
-
565
- <span class="aliases">Also known as:
566
- <span class="names"><span id='required_field-instance_method'>required_field</span></span>
567
- </span>
568
-
569
- </p><table class="source_code">
570
- <tr>
571
- <td>
572
- <pre class="lines">
573
-
574
-
575
- 79
576
- 80
577
- 81
578
- 82
579
- 83</pre>
580
- </td>
581
- <td>
582
- <pre class="code"><span class="info file"># File 'lib/mattock/configurable.rb', line 79</span>
583
-
584
- <span class='kw'>def</span> <span class='id identifier rubyid_required_fields'>required_fields</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_names'>names</span><span class='rparen'>)</span>
585
- <span class='id identifier rubyid_names'>names</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_name'>name</span><span class='op'>|</span>
586
- <span class='id identifier rubyid_setting'>setting</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
587
- <span class='kw'>end</span>
588
- <span class='kw'>end</span></pre>
589
- </td>
590
- </tr>
591
- </table>
592
- </div>
593
-
594
- <div class="method_details ">
595
- <p class="signature " id="set_defaults_on-instance_method">
596
-
597
- - (<tt>Object</tt>) <strong>set_defaults_on</strong>(instance)
598
-
599
-
600
-
601
- </p><table class="source_code">
602
- <tr>
603
- <td>
604
- <pre class="lines">
605
-
606
-
607
- 21
608
- 22
609
- 23
610
- 24
611
- 25
612
- 26
613
- 27
614
- 28
615
- 29
616
- 30
617
- 31</pre>
618
- </td>
619
- <td>
620
- <pre class="code"><span class="info file"># File 'lib/mattock/configurable.rb', line 21</span>
621
-
622
- <span class='kw'>def</span> <span class='id identifier rubyid_set_defaults_on'>set_defaults_on</span><span class='lparen'>(</span><span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span>
623
- <span class='kw'>if</span> <span class='const'>Configurable</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_superclass'>superclass</span>
624
- <span class='id identifier rubyid_superclass'>superclass</span><span class='period'>.</span><span class='id identifier rubyid_set_defaults_on'>set_defaults_on</span><span class='lparen'>(</span><span class='id identifier rubyid_instance'>instance</span><span class='rparen'>)</span>
625
- <span class='kw'>end</span>
626
- <span class='id identifier rubyid_default_values'>default_values</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span><span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
627
- <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid___send__'>__send__</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
628
- <span class='kw'>if</span> <span class='const'>Configurable</span> <span class='op'>===</span> <span class='id identifier rubyid_value'>value</span>
629
- <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_set_defaults_on'>set_defaults_on</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
630
- <span class='kw'>end</span>
631
- <span class='kw'>end</span>
632
- <span class='kw'>end</span></pre>
633
- </td>
634
- </tr>
635
- </table>
636
- </div>
637
-
638
- <div class="method_details ">
639
- <p class="signature " id="setting-instance_method">
640
-
641
- - (<tt>Object</tt>) <strong>setting</strong>(name, default_value = RequiredField)
642
-
643
-
644
-
645
- </p><div class="docstring">
646
- <div class="discussion">
647
- <dl class="rdoc-list label-list"><dt>
648
- <dd>
649
- <p>The default value of</p>
650
- </dd></dl>
651
-
652
-
653
- </div>
654
- </div>
655
- <div class="tags">
656
-
657
- <h3>Returns:</h3>
658
- <ul class="return">
659
-
660
- <li>
661
-
662
-
663
- <span class='type'></span>
664
-
665
-
666
-
667
-
668
- <div class='inline'><dl class="rdoc-list label-list"><dt>
669
- <dd>
670
- <p>The default value of</p>
671
- </dd></dl>
672
- </div>
673
-
674
- </li>
675
-
676
- </ul>
677
-
678
- </div><table class="source_code">
679
- <tr>
680
- <td>
681
- <pre class="lines">
682
-
683
-
684
- 90
685
- 91
686
- 92
687
- 93
688
- 94
689
- 95
690
- 96
691
- 97</pre>
692
- </td>
693
- <td>
694
- <pre class="code"><span class="info file"># File 'lib/mattock/configurable.rb', line 90</span>
695
-
696
- <span class='kw'>def</span> <span class='id identifier rubyid_setting'>setting</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_default_value'>default_value</span> <span class='op'>=</span> <span class='const'>RequiredField</span><span class='rparen'>)</span>
697
- <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
698
- <span class='id identifier rubyid_attr_accessor'>attr_accessor</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
699
- <span class='kw'>if</span> <span class='id identifier rubyid_default_values'>default_values</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='kw'>and</span> <span class='id identifier rubyid_default_values'>default_values</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='id identifier rubyid_default_value'>default_value</span>
700
- <span class='id identifier rubyid_warn'>warn</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Changing default value of </span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>#</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> from </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_default_values'>default_values</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_content'> to </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_default_value'>default_value</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
701
- <span class='kw'>end</span>
702
- <span class='id identifier rubyid_default_values'>default_values</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_default_value'>default_value</span>
703
- <span class='kw'>end</span></pre>
704
- </td>
705
- </tr>
706
- </table>
707
- </div>
708
-
709
- <div class="method_details ">
710
- <p class="signature " id="settings-instance_method">
711
-
712
- - (<tt>Object</tt>) <strong>settings</strong>(hash)
713
-
714
-
715
-
716
- </p><table class="source_code">
717
- <tr>
718
- <td>
719
- <pre class="lines">
720
-
721
-
722
- 99
723
- 100
724
- 101
725
- 102
726
- 103
727
- 104</pre>
728
- </td>
729
- <td>
730
- <pre class="code"><span class="info file"># File 'lib/mattock/configurable.rb', line 99</span>
731
-
732
- <span class='kw'>def</span> <span class='id identifier rubyid_settings'>settings</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span>
733
- <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
734
- <span class='id identifier rubyid_setting'>setting</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
735
- <span class='kw'>end</span>
736
- <span class='kw'>return</span> <span class='kw'>self</span>
737
- <span class='kw'>end</span></pre>
738
- </td>
739
- </tr>
740
- </table>
741
- </div>
742
-
743
- </div>
744
-
745
- </div>
746
-
747
- <div id="footer">
748
- Generated on Tue Mar 6 02:47:29 2012 by
749
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
750
- 0.7.5 (ruby-1.9.2).
751
- </div>
752
-
753
- </body>
754
- </html>