compony 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/Gemfile.lock +3 -3
  4. data/README.md +1397 -33
  5. data/Rakefile +6 -2
  6. data/TODO.md +1 -0
  7. data/VERSION +1 -0
  8. data/app/controllers/compony_controller.rb +3 -1
  9. data/compony.gemspec +7 -7
  10. data/config/locales/fr.yml +33 -0
  11. data/doc/ComponentGenerator.html +231 -0
  12. data/doc/Components.html +105 -0
  13. data/doc/ComponentsGenerator.html +203 -0
  14. data/doc/Compony/Component.html +2098 -0
  15. data/doc/Compony/ComponentMixins/Default/Labelling.html +406 -0
  16. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +539 -0
  17. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +588 -0
  18. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +577 -0
  19. data/doc/Compony/ComponentMixins/Default/Standalone.html +692 -0
  20. data/doc/Compony/ComponentMixins/Default.html +126 -0
  21. data/doc/Compony/ComponentMixins/Resourceful.html +1193 -0
  22. data/doc/Compony/ComponentMixins.html +126 -0
  23. data/doc/Compony/Components/Button.html +293 -0
  24. data/doc/Compony/Components/Destroy.html +384 -0
  25. data/doc/Compony/Components/Edit.html +462 -0
  26. data/doc/Compony/Components/Form.html +1112 -0
  27. data/doc/Compony/Components/New.html +462 -0
  28. data/doc/Compony/Components/WithForm.html +528 -0
  29. data/doc/Compony/Components.html +126 -0
  30. data/doc/Compony/ControllerMixin.html +136 -0
  31. data/doc/Compony/Engine.html +133 -0
  32. data/doc/Compony/MethodAccessibleHash.html +453 -0
  33. data/doc/Compony/ModelFields/Anchormodel.html +383 -0
  34. data/doc/Compony/ModelFields/Association.html +613 -0
  35. data/doc/Compony/ModelFields/Attachment.html +305 -0
  36. data/doc/Compony/ModelFields/Base.html +1066 -0
  37. data/doc/Compony/ModelFields/Boolean.html +232 -0
  38. data/doc/Compony/ModelFields/Color.html +299 -0
  39. data/doc/Compony/ModelFields/Currency.html +232 -0
  40. data/doc/Compony/ModelFields/Date.html +232 -0
  41. data/doc/Compony/ModelFields/Datetime.html +232 -0
  42. data/doc/Compony/ModelFields/Decimal.html +154 -0
  43. data/doc/Compony/ModelFields/Email.html +240 -0
  44. data/doc/Compony/ModelFields/Float.html +154 -0
  45. data/doc/Compony/ModelFields/Integer.html +154 -0
  46. data/doc/Compony/ModelFields/Percentage.html +232 -0
  47. data/doc/Compony/ModelFields/Phone.html +301 -0
  48. data/doc/Compony/ModelFields/RichText.html +232 -0
  49. data/doc/Compony/ModelFields/String.html +154 -0
  50. data/doc/Compony/ModelFields/Text.html +154 -0
  51. data/doc/Compony/ModelFields/Time.html +154 -0
  52. data/doc/Compony/ModelFields/Url.html +240 -0
  53. data/doc/Compony/ModelFields.html +126 -0
  54. data/doc/Compony/ModelMixin.html +524 -0
  55. data/doc/Compony/RequestContext.html +791 -0
  56. data/doc/Compony/Version.html +139 -0
  57. data/doc/Compony/ViewHelpers.html +443 -0
  58. data/doc/Compony.html +2156 -0
  59. data/doc/ComponyController.html +124 -0
  60. data/doc/_index.html +569 -0
  61. data/doc/class_list.html +51 -0
  62. data/doc/css/common.css +1 -0
  63. data/doc/css/full_list.css +58 -0
  64. data/doc/css/style.css +497 -0
  65. data/doc/file.README.html +1565 -0
  66. data/doc/file_list.html +56 -0
  67. data/doc/frames.html +17 -0
  68. data/doc/imgs/intro-example-destroy.png +0 -0
  69. data/doc/imgs/intro-example-edit.png +0 -0
  70. data/doc/imgs/intro-example-index.png +0 -0
  71. data/doc/imgs/intro-example-new.png +0 -0
  72. data/doc/imgs/intro-example-show.png +0 -0
  73. data/doc/index.html +1565 -0
  74. data/doc/js/app.js +314 -0
  75. data/doc/js/full_list.js +216 -0
  76. data/doc/js/jquery.js +4 -0
  77. data/doc/method_list.html +1435 -0
  78. data/doc/resourceful_lifecycle.png +0 -0
  79. data/doc/top-level-namespace.html +112 -0
  80. data/lib/compony/component.rb +2 -1
  81. data/lib/compony/component_mixins/default/standalone/resourceful_verb_dsl.rb +1 -1
  82. data/lib/compony/component_mixins/default/standalone/standalone_dsl.rb +14 -3
  83. data/lib/compony/component_mixins/default/standalone/verb_dsl.rb +14 -5
  84. data/lib/compony/component_mixins/default/standalone.rb +10 -3
  85. data/lib/compony/components/form.rb +6 -1
  86. data/lib/compony/components/with_form.rb +14 -1
  87. data/lib/compony/model_fields/anchormodel.rb +0 -22
  88. data/lib/compony/model_mixin.rb +12 -2
  89. data/lib/compony/version.rb +1 -7
  90. data/logo.svg +133 -0
  91. metadata +83 -6
@@ -0,0 +1,577 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Compony::ComponentMixins::Default::Standalone::VerbDsl
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Compony::ComponentMixins::Default::Standalone::VerbDsl";
19
+ relpath = '../../../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../../../_index.html">Index (V)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../../../Compony.html" title="Compony (module)">Compony</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../ComponentMixins.html" title="Compony::ComponentMixins (module)">ComponentMixins</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Default.html" title="Compony::ComponentMixins::Default (module)">Default</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Standalone.html" title="Compony::ComponentMixins::Default::Standalone (module)">Standalone</a></span></span>
41
+ &raquo;
42
+ <span class="title">VerbDsl</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Compony::ComponentMixins::Default::Standalone::VerbDsl
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Dslblend::Base</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Dslblend::Base</li>
78
+
79
+ <li class="next">Compony::ComponentMixins::Default::Standalone::VerbDsl</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/compony/component_mixins/default/standalone/verb_dsl.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>DSL for speficying verb configs within a standalone config.</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ <p class="tag_title">See Also:</p>
116
+ <ul class="see">
117
+
118
+ <li><span class='object_link'><a href="" title="Compony::ComponentMixins::Default::Standalone::VerbDsl (class)">for the verb DSL for resourceful components</a></span></li>
119
+
120
+ <li><span class='object_link'><a href="StandaloneDsl.html" title="Compony::ComponentMixins::Default::Standalone::StandaloneDsl (class)">StandaloneDsl</a></span></li>
121
+
122
+ </ul>
123
+
124
+ </div><div id="subclasses">
125
+ <h2>Direct Known Subclasses</h2>
126
+ <p class="children"><span class='object_link'><a href="ResourcefulVerbDsl.html" title="Compony::ComponentMixins::Default::Standalone::ResourcefulVerbDsl (class)">ResourcefulVerbDsl</a></span></p>
127
+ </div>
128
+
129
+
130
+ <h2>
131
+ Constant Summary
132
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
133
+ </h2>
134
+
135
+ <dl class="constants">
136
+
137
+ <dt id="AVAILABLE_VERBS-constant" class="">AVAILABLE_VERBS =
138
+ <div class="docstring">
139
+ <div class="discussion">
140
+
141
+
142
+ </div>
143
+ </div>
144
+ <div class="tags">
145
+
146
+
147
+ </div>
148
+ </dt>
149
+ <dd><pre class="code"><span class='qsymbols_beg'>%i[</span><span class='tstring_content'>get</span><span class='words_sep'> </span><span class='tstring_content'>head</span><span class='words_sep'> </span><span class='tstring_content'>post</span><span class='words_sep'> </span><span class='tstring_content'>put</span><span class='words_sep'> </span><span class='tstring_content'>delete</span><span class='words_sep'> </span><span class='tstring_content'>connect</span><span class='words_sep'> </span><span class='tstring_content'>options</span><span class='words_sep'> </span><span class='tstring_content'>trace</span><span class='words_sep'> </span><span class='tstring_content'>patch</span><span class='tstring_end'>]</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
150
+
151
+ </dl>
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+ <h2>
162
+ Instance Method Summary
163
+ <small><a href="#" class="summary_toggle">collapse</a></small>
164
+ </h2>
165
+
166
+ <ul class="summary">
167
+
168
+ <li class="protected ">
169
+ <span class="summary_signature">
170
+
171
+ <a href="#authorize-instance_method" title="#authorize (instance method)">#<strong>authorize</strong>(&amp;block) &#x21d2; Object </a>
172
+
173
+
174
+
175
+ </span>
176
+
177
+
178
+
179
+ <span class="note title protected">protected</span>
180
+
181
+
182
+
183
+
184
+
185
+ <span class="summary_desc"><div class='inline'>
186
+ <p>DSL This block is expected to return true if and only if current_ability has the right to access the component over the given verb.</p>
187
+ </div></span>
188
+
189
+ </li>
190
+
191
+
192
+ <li class="protected ">
193
+ <span class="summary_signature">
194
+
195
+ <a href="#default_config-instance_method" title="#default_config (instance method)">#<strong>default_config</strong> &#x21d2; Object </a>
196
+
197
+
198
+
199
+ </span>
200
+
201
+
202
+
203
+ <span class="note title protected">protected</span>
204
+
205
+
206
+
207
+
208
+
209
+ <span class="summary_desc"><div class='inline'>
210
+ <p>Internal, do not use.</p>
211
+ </div></span>
212
+
213
+ </li>
214
+
215
+
216
+ <li class="public ">
217
+ <span class="summary_signature">
218
+
219
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(component, verb) &#x21d2; VerbDsl </a>
220
+
221
+
222
+
223
+ </span>
224
+
225
+
226
+ <span class="note title constructor">constructor</span>
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+ <span class="summary_desc"><div class='inline'>
236
+ <p>A new instance of VerbDsl.</p>
237
+ </div></span>
238
+
239
+ </li>
240
+
241
+
242
+ <li class="protected ">
243
+ <span class="summary_signature">
244
+
245
+ <a href="#respond-instance_method" title="#respond (instance method)">#<strong>respond</strong>(format = nil, &amp;block) &#x21d2; Object </a>
246
+
247
+
248
+
249
+ </span>
250
+
251
+
252
+
253
+ <span class="note title protected">protected</span>
254
+
255
+
256
+
257
+
258
+
259
+ <span class="summary_desc"><div class='inline'>
260
+ <p>DSL This is the last step in the life cycle.</p>
261
+ </div></span>
262
+
263
+ </li>
264
+
265
+
266
+ <li class="public ">
267
+ <span class="summary_signature">
268
+
269
+ <a href="#to_conf-instance_method" title="#to_conf (instance method)">#<strong>to_conf</strong>(provide_defaults:) &#x21d2; Object </a>
270
+
271
+
272
+
273
+ </span>
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+ <span class="summary_desc"><div class='inline'>
284
+ <p>For internal usage only, processes the block and returns a config hash.</p>
285
+ </div></span>
286
+
287
+ </li>
288
+
289
+
290
+ </ul>
291
+
292
+
293
+
294
+ <div id="constructor_details" class="method_details_list">
295
+ <h2>Constructor Details</h2>
296
+
297
+ <div class="method_details first">
298
+ <h3 class="signature first" id="initialize-instance_method">
299
+
300
+ #<strong>initialize</strong>(component, verb) &#x21d2; <tt><span class='object_link'><a href="" title="Compony::ComponentMixins::Default::Standalone::VerbDsl (class)">VerbDsl</a></span></tt>
301
+
302
+
303
+
304
+
305
+
306
+ </h3><div class="docstring">
307
+ <div class="discussion">
308
+
309
+ <p>Returns a new instance of VerbDsl.</p>
310
+
311
+
312
+ </div>
313
+ </div>
314
+ <div class="tags">
315
+
316
+
317
+ </div><table class="source_code">
318
+ <tr>
319
+ <td>
320
+ <pre class="lines">
321
+
322
+
323
+ 12
324
+ 13
325
+ 14
326
+ 15
327
+ 16
328
+ 17
329
+ 18
330
+ 19
331
+ 20
332
+ 21
333
+ 22</pre>
334
+ </td>
335
+ <td>
336
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/verb_dsl.rb', line 12</span>
337
+
338
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_component'>component</span><span class='comma'>,</span> <span class='id identifier rubyid_verb'>verb</span><span class='rparen'>)</span>
339
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='rparen'>)</span>
340
+
341
+ <span class='id identifier rubyid_verb'>verb</span> <span class='op'>=</span> <span class='id identifier rubyid_verb'>verb</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
342
+ <span class='id identifier rubyid_fail'>fail</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unknown HTTP verb </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_verb'>verb</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>, use one of </span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="#AVAILABLE_VERBS-constant" title="Compony::ComponentMixins::Default::Standalone::VerbDsl::AVAILABLE_VERBS (constant)">AVAILABLE_VERBS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='const'><span class='object_link'><a href="#AVAILABLE_VERBS-constant" title="Compony::ComponentMixins::Default::Standalone::VerbDsl::AVAILABLE_VERBS (constant)">AVAILABLE_VERBS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_verb'>verb</span><span class='rparen'>)</span>
343
+
344
+ <span class='ivar'>@component</span> <span class='op'>=</span> <span class='id identifier rubyid_component'>component</span>
345
+ <span class='ivar'>@verb</span> <span class='op'>=</span> <span class='id identifier rubyid_verb'>verb</span>
346
+ <span class='ivar'>@respond_blocks</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
347
+ <span class='ivar'>@authorize_block</span> <span class='op'>=</span> <span class='kw'>nil</span>
348
+ <span class='kw'>end</span></pre>
349
+ </td>
350
+ </tr>
351
+ </table>
352
+ </div>
353
+
354
+ </div>
355
+
356
+
357
+ <div id="instance_method_details" class="method_details_list">
358
+ <h2>Instance Method Details</h2>
359
+
360
+
361
+ <div class="method_details first">
362
+ <h3 class="signature first" id="authorize-instance_method">
363
+
364
+ #<strong>authorize</strong>(&amp;block) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
365
+
366
+
367
+
368
+
369
+
370
+ </h3><div class="docstring">
371
+ <div class="discussion">
372
+
373
+ <p>DSL This block is expected to return true if and only if current_ability has the right to access the component over the given verb.</p>
374
+
375
+
376
+ </div>
377
+ </div>
378
+ <div class="tags">
379
+
380
+
381
+ </div><table class="source_code">
382
+ <tr>
383
+ <td>
384
+ <pre class="lines">
385
+
386
+
387
+ 39
388
+ 40
389
+ 41</pre>
390
+ </td>
391
+ <td>
392
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/verb_dsl.rb', line 39</span>
393
+
394
+ <span class='kw'>def</span> <span class='id identifier rubyid_authorize'>authorize</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
395
+ <span class='ivar'>@authorize_block</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
396
+ <span class='kw'>end</span></pre>
397
+ </td>
398
+ </tr>
399
+ </table>
400
+ </div>
401
+
402
+ <div class="method_details ">
403
+ <h3 class="signature " id="default_config-instance_method">
404
+
405
+ #<strong>default_config</strong> &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
406
+
407
+
408
+
409
+
410
+
411
+ </h3><div class="docstring">
412
+ <div class="discussion">
413
+
414
+ <p>Internal, do not use</p>
415
+
416
+
417
+ </div>
418
+ </div>
419
+ <div class="tags">
420
+
421
+
422
+ </div><table class="source_code">
423
+ <tr>
424
+ <td>
425
+ <pre class="lines">
426
+
427
+
428
+ 51
429
+ 52
430
+ 53
431
+ 54
432
+ 55
433
+ 56</pre>
434
+ </td>
435
+ <td>
436
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/verb_dsl.rb', line 51</span>
437
+
438
+ <span class='kw'>def</span> <span class='id identifier rubyid_default_config'>default_config</span>
439
+ <span class='kw'>return</span> <span class='lbrace'>{</span>
440
+ <span class='label'>authorize_block:</span> <span class='id identifier rubyid_proc'>proc</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_can?'>can?</span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name'>comp_name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='comma'>,</span> <span class='id identifier rubyid_family_name'>family_name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span>
441
+ <span class='label'>respond_blocks:</span> <span class='lbrace'>{</span> <span class='kw'>nil</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_proc'>proc</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_render_standalone'>render_standalone</span><span class='lparen'>(</span><span class='id identifier rubyid_controller'>controller</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
442
+ <span class='rbrace'>}</span>
443
+ <span class='kw'>end</span></pre>
444
+ </td>
445
+ </tr>
446
+ </table>
447
+ </div>
448
+
449
+ <div class="method_details ">
450
+ <h3 class="signature " id="respond-instance_method">
451
+
452
+ #<strong>respond</strong>(format = nil, &amp;block) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
453
+
454
+
455
+
456
+
457
+
458
+ </h3><div class="docstring">
459
+ <div class="discussion">
460
+
461
+ <p>DSL This is the last step in the life cycle. It may redirect or render. If omitted, the default is standalone_render.</p>
462
+
463
+
464
+ </div>
465
+ </div>
466
+ <div class="tags">
467
+ <p class="tag_title">Parameters:</p>
468
+ <ul class="param">
469
+
470
+ <li>
471
+
472
+ <span class='name'>format</span>
473
+
474
+
475
+ <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
476
+
477
+
478
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
479
+
480
+
481
+ &mdash;
482
+ <div class='inline'>
483
+ <p>Format this block should respond to, defaults to <code>nil</code> which means “all other formats”.</p>
484
+ </div>
485
+
486
+ </li>
487
+
488
+ </ul>
489
+
490
+
491
+ </div><table class="source_code">
492
+ <tr>
493
+ <td>
494
+ <pre class="lines">
495
+
496
+
497
+ 46
498
+ 47
499
+ 48</pre>
500
+ </td>
501
+ <td>
502
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/verb_dsl.rb', line 46</span>
503
+
504
+ <span class='kw'>def</span> <span class='id identifier rubyid_respond'>respond</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
505
+ <span class='ivar'>@respond_blocks</span><span class='lbracket'>[</span><span class='id identifier rubyid_format'>format</span><span class='op'>&amp;.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
506
+ <span class='kw'>end</span></pre>
507
+ </td>
508
+ </tr>
509
+ </table>
510
+ </div>
511
+
512
+ <div class="method_details ">
513
+ <h3 class="signature " id="to_conf-instance_method">
514
+
515
+ #<strong>to_conf</strong>(provide_defaults:) &#x21d2; <tt>Object</tt>
516
+
517
+
518
+
519
+
520
+
521
+ </h3><div class="docstring">
522
+ <div class="discussion">
523
+
524
+ <p>For internal usage only, processes the block and returns a config hash.</p>
525
+
526
+
527
+ </div>
528
+ </div>
529
+ <div class="tags">
530
+
531
+
532
+ </div><table class="source_code">
533
+ <tr>
534
+ <td>
535
+ <pre class="lines">
536
+
537
+
538
+ 25
539
+ 26
540
+ 27
541
+ 28
542
+ 29
543
+ 30
544
+ 31
545
+ 32
546
+ 33</pre>
547
+ </td>
548
+ <td>
549
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/verb_dsl.rb', line 25</span>
550
+
551
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_conf'>to_conf</span><span class='lparen'>(</span><span class='label'>provide_defaults:</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='rparen'>)</span>
552
+ <span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
553
+ <span class='id identifier rubyid_base_config'>base_config</span> <span class='op'>=</span> <span class='id identifier rubyid_provide_defaults'>provide_defaults</span> <span class='op'>?</span> <span class='id identifier rubyid_default_config'>default_config</span> <span class='op'>:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
554
+ <span class='kw'>return</span> <span class='id identifier rubyid_base_config'>base_config</span><span class='period'>.</span><span class='id identifier rubyid_deep_merge'>deep_merge</span><span class='lparen'>(</span><span class='lbrace'>{</span>
555
+ <span class='label'>verb:</span> <span class='ivar'>@verb</span><span class='comma'>,</span>
556
+ <span class='label'>authorize_block:</span> <span class='ivar'>@authorize_block</span><span class='comma'>,</span>
557
+ <span class='label'>respond_blocks:</span> <span class='ivar'>@respond_blocks</span>
558
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='rparen'>)</span>
559
+ <span class='kw'>end</span></pre>
560
+ </td>
561
+ </tr>
562
+ </table>
563
+ </div>
564
+
565
+ </div>
566
+
567
+ </div>
568
+
569
+ <div id="footer">
570
+ Generated on Wed Apr 24 17:14:06 2024 by
571
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
572
+ 0.9.34 (ruby-3.2.2).
573
+ </div>
574
+
575
+ </div>
576
+ </body>
577
+ </html>