compony 0.2.1 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/CHANGELOG.md +11 -0
  4. data/Gemfile.lock +3 -3
  5. data/README.md +1397 -33
  6. data/Rakefile +6 -2
  7. data/TODO.md +1 -0
  8. data/VERSION +1 -0
  9. data/compony.gemspec +7 -7
  10. data/doc/ComponentGenerator.html +231 -0
  11. data/doc/Components.html +105 -0
  12. data/doc/ComponentsGenerator.html +203 -0
  13. data/doc/Compony/Component.html +2098 -0
  14. data/doc/Compony/ComponentMixins/Default/Labelling.html +406 -0
  15. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +539 -0
  16. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +588 -0
  17. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +577 -0
  18. data/doc/Compony/ComponentMixins/Default/Standalone.html +692 -0
  19. data/doc/Compony/ComponentMixins/Default.html +126 -0
  20. data/doc/Compony/ComponentMixins/Resourceful.html +1193 -0
  21. data/doc/Compony/ComponentMixins.html +126 -0
  22. data/doc/Compony/Components/Button.html +293 -0
  23. data/doc/Compony/Components/Destroy.html +384 -0
  24. data/doc/Compony/Components/Edit.html +462 -0
  25. data/doc/Compony/Components/Form.html +1112 -0
  26. data/doc/Compony/Components/New.html +462 -0
  27. data/doc/Compony/Components/WithForm.html +528 -0
  28. data/doc/Compony/Components.html +126 -0
  29. data/doc/Compony/ControllerMixin.html +136 -0
  30. data/doc/Compony/Engine.html +133 -0
  31. data/doc/Compony/MethodAccessibleHash.html +453 -0
  32. data/doc/Compony/ModelFields/Anchormodel.html +387 -0
  33. data/doc/Compony/ModelFields/Association.html +613 -0
  34. data/doc/Compony/ModelFields/Attachment.html +305 -0
  35. data/doc/Compony/ModelFields/Base.html +1066 -0
  36. data/doc/Compony/ModelFields/Boolean.html +232 -0
  37. data/doc/Compony/ModelFields/Color.html +299 -0
  38. data/doc/Compony/ModelFields/Currency.html +232 -0
  39. data/doc/Compony/ModelFields/Date.html +232 -0
  40. data/doc/Compony/ModelFields/Datetime.html +232 -0
  41. data/doc/Compony/ModelFields/Decimal.html +154 -0
  42. data/doc/Compony/ModelFields/Email.html +240 -0
  43. data/doc/Compony/ModelFields/Float.html +154 -0
  44. data/doc/Compony/ModelFields/Integer.html +154 -0
  45. data/doc/Compony/ModelFields/Percentage.html +232 -0
  46. data/doc/Compony/ModelFields/Phone.html +301 -0
  47. data/doc/Compony/ModelFields/RichText.html +232 -0
  48. data/doc/Compony/ModelFields/String.html +154 -0
  49. data/doc/Compony/ModelFields/Text.html +154 -0
  50. data/doc/Compony/ModelFields/Time.html +154 -0
  51. data/doc/Compony/ModelFields/Url.html +240 -0
  52. data/doc/Compony/ModelFields.html +126 -0
  53. data/doc/Compony/ModelMixin.html +524 -0
  54. data/doc/Compony/RequestContext.html +791 -0
  55. data/doc/Compony/Version.html +139 -0
  56. data/doc/Compony/ViewHelpers.html +443 -0
  57. data/doc/Compony.html +2156 -0
  58. data/doc/ComponyController.html +124 -0
  59. data/doc/_index.html +569 -0
  60. data/doc/class_list.html +51 -0
  61. data/doc/css/common.css +1 -0
  62. data/doc/css/full_list.css +58 -0
  63. data/doc/css/style.css +497 -0
  64. data/doc/file.README.html +1565 -0
  65. data/doc/file_list.html +56 -0
  66. data/doc/frames.html +17 -0
  67. data/doc/imgs/intro-example-destroy.png +0 -0
  68. data/doc/imgs/intro-example-edit.png +0 -0
  69. data/doc/imgs/intro-example-index.png +0 -0
  70. data/doc/imgs/intro-example-new.png +0 -0
  71. data/doc/imgs/intro-example-show.png +0 -0
  72. data/doc/index.html +1565 -0
  73. data/doc/js/app.js +314 -0
  74. data/doc/js/full_list.js +216 -0
  75. data/doc/js/jquery.js +4 -0
  76. data/doc/method_list.html +1435 -0
  77. data/doc/resourceful_lifecycle.png +0 -0
  78. data/doc/top-level-namespace.html +112 -0
  79. data/lib/compony/component.rb +2 -1
  80. data/lib/compony/component_mixins/default/standalone.rb +4 -0
  81. data/lib/compony/components/with_form.rb +1 -0
  82. data/lib/compony/model_fields/anchormodel.rb +3 -23
  83. data/lib/compony/model_mixin.rb +12 -2
  84. data/lib/compony/version.rb +1 -7
  85. data/logo.svg +133 -0
  86. metadata +82 -6
@@ -0,0 +1,528 @@
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::Components::WithForm
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::Components::WithForm";
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 (W)</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="../Components.html" title="Compony::Components (module)">Components</a></span></span>
41
+ &raquo;
42
+ <span class="title">WithForm</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::Components::WithForm
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="../Component.html" title="Compony::Component (class)">Compony::Component</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="../Component.html" title="Compony::Component (class)">Compony::Component</a></span></li>
78
+
79
+ <li class="next">Compony::Components::WithForm</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/components/with_form.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>This component is destined to take a sub-component that is a form component. It can be called via :get or via <code>submit_verb</code> depending on whether its form should be shown or submitted.</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div><div id="subclasses">
116
+ <h2>Direct Known Subclasses</h2>
117
+ <p class="children"><span class='object_link'><a href="Edit.html" title="Compony::Components::Edit (class)">Edit</a></span>, <span class='object_link'><a href="New.html" title="Compony::Components::New (class)">New</a></span></p>
118
+ </div>
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <h2>Instance Attribute Summary</h2>
126
+
127
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../Component.html" title="Compony::Component (class)">Compony::Component</a></span></h3>
128
+ <p class="inherited"><span class='object_link'><a href="../Component.html#comp_opts-instance_method" title="Compony::Component#comp_opts (method)">#comp_opts</a></span>, <span class='object_link'><a href="../Component.html#parent_comp-instance_method" title="Compony::Component#parent_comp (method)">#parent_comp</a></span></p>
129
+
130
+
131
+
132
+ <h2>
133
+ Instance Method Summary
134
+ <small><a href="#" class="summary_toggle">collapse</a></small>
135
+ </h2>
136
+
137
+ <ul class="summary">
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#form_comp-instance_method" title="#form_comp (instance method)">#<strong>form_comp</strong> &#x21d2; Object </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'>
157
+ <p>Returns an instance of the form component responsible for rendering the form.</p>
158
+ </div></span>
159
+
160
+ </li>
161
+
162
+
163
+ <li class="public ">
164
+ <span class="summary_signature">
165
+
166
+ <a href="#form_comp_class-instance_method" title="#form_comp_class (instance method)">#<strong>form_comp_class</strong>(new_form_comp_class = nil) &#x21d2; Object </a>
167
+
168
+
169
+
170
+ </span>
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+ <span class="summary_desc"><div class='inline'>
181
+ <p>DSL method Overrides the form comp class that is instanciated to render the form.</p>
182
+ </div></span>
183
+
184
+ </li>
185
+
186
+
187
+ <li class="public ">
188
+ <span class="summary_signature">
189
+
190
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; WithForm </a>
191
+
192
+
193
+
194
+ </span>
195
+
196
+
197
+ <span class="note title constructor">constructor</span>
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+ <span class="summary_desc"><div class='inline'>
207
+ <p>A new instance of WithForm.</p>
208
+ </div></span>
209
+
210
+ </li>
211
+
212
+
213
+ <li class="public ">
214
+ <span class="summary_signature">
215
+
216
+ <a href="#submit_path-instance_method" title="#submit_path (instance method)">#<strong>submit_path</strong>(&amp;new_submit_path_block) &#x21d2; Object </a>
217
+
218
+
219
+
220
+ </span>
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+ <span class="summary_desc"><div class='inline'>
231
+ <p>DSL method Overrides the submit path which would otherwise default to this component This takes a block that will be called and given a controller.</p>
232
+ </div></span>
233
+
234
+ </li>
235
+
236
+
237
+ <li class="public ">
238
+ <span class="summary_signature">
239
+
240
+ <a href="#submit_verb-instance_method" title="#submit_verb (instance method)">#<strong>submit_verb</strong>(new_submit_verb = nil) &#x21d2; Object </a>
241
+
242
+
243
+
244
+ </span>
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+ <span class="summary_desc"><div class='inline'>
255
+ <p>DSL method Sets or returns the previously set submit verb.</p>
256
+ </div></span>
257
+
258
+ </li>
259
+
260
+
261
+ </ul>
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Component.html" title="Compony::Component (class)">Compony::Component</a></span></h3>
274
+ <p class="inherited"><span class='object_link'><a href="../Component.html#action-instance_method" title="Compony::Component#action (method)">#action</a></span>, <span class='object_link'><a href="../Component.html#add_content-instance_method" title="Compony::Component#add_content (method)">#add_content</a></span>, <span class='object_link'><a href="../Component.html#before_render-instance_method" title="Compony::Component#before_render (method)">#before_render</a></span>, <span class='object_link'><a href="../Component.html#comp_class_for-instance_method" title="Compony::Component#comp_class_for (method)">#comp_class_for</a></span>, <span class='object_link'><a href="../Component.html#comp_class_for!-instance_method" title="Compony::Component#comp_class_for! (method)">#comp_class_for!</a></span>, <span class='object_link'><a href="../Component.html#comp_cst-instance_method" title="Compony::Component#comp_cst (method)">#comp_cst</a></span>, <span class='object_link'><a href="../Component.html#comp_name-instance_method" title="Compony::Component#comp_name (method)">#comp_name</a></span>, <span class='object_link'><a href="../Component.html#content-instance_method" title="Compony::Component#content (method)">#content</a></span>, <span class='object_link'><a href="../Component.html#family_cst-instance_method" title="Compony::Component#family_cst (method)">#family_cst</a></span>, <span class='object_link'><a href="../Component.html#family_name-instance_method" title="Compony::Component#family_name (method)">#family_name</a></span>, <span class='object_link'><a href="../Component.html#id-instance_method" title="Compony::Component#id (method)">#id</a></span>, <span class='object_link'><a href="../Component.html#inspect-instance_method" title="Compony::Component#inspect (method)">#inspect</a></span>, <span class='object_link'><a href="../Component.html#param_name-instance_method" title="Compony::Component#param_name (method)">#param_name</a></span>, <span class='object_link'><a href="../Component.html#path-instance_method" title="Compony::Component#path (method)">#path</a></span>, <span class='object_link'><a href="../Component.html#path_hash-instance_method" title="Compony::Component#path_hash (method)">#path_hash</a></span>, <span class='object_link'><a href="../Component.html#render-instance_method" title="Compony::Component#render (method)">#render</a></span>, <span class='object_link'><a href="../Component.html#render_actions-instance_method" title="Compony::Component#render_actions (method)">#render_actions</a></span>, <span class='object_link'><a href="../Component.html#resourceful%3F-instance_method" title="Compony::Component#resourceful? (method)">#resourceful?</a></span>, <span class='object_link'><a href="../Component.html#root_comp-instance_method" title="Compony::Component#root_comp (method)">#root_comp</a></span>, <span class='object_link'><a href="../Component.html#root_comp%3F-instance_method" title="Compony::Component#root_comp? (method)">#root_comp?</a></span>, <span class='object_link'><a href="../Component.html#setup-class_method" title="Compony::Component.setup (method)">setup</a></span>, <span class='object_link'><a href="../Component.html#skip_action-instance_method" title="Compony::Component#skip_action (method)">#skip_action</a></span>, <span class='object_link'><a href="../Component.html#sub_comp-instance_method" title="Compony::Component#sub_comp (method)">#sub_comp</a></span></p>
275
+ <div id="constructor_details" class="method_details_list">
276
+ <h2>Constructor Details</h2>
277
+
278
+ <div class="method_details first">
279
+ <h3 class="signature first" id="initialize-instance_method">
280
+
281
+ #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href="" title="Compony::Components::WithForm (class)">WithForm</a></span></tt>
282
+
283
+
284
+
285
+
286
+
287
+ </h3><div class="docstring">
288
+ <div class="discussion">
289
+
290
+ <p>Returns a new instance of WithForm.</p>
291
+
292
+
293
+ </div>
294
+ </div>
295
+ <div class="tags">
296
+
297
+
298
+ </div><table class="source_code">
299
+ <tr>
300
+ <td>
301
+ <pre class="lines">
302
+
303
+
304
+ 7
305
+ 8
306
+ 9
307
+ 10
308
+ 11</pre>
309
+ </td>
310
+ <td>
311
+ <pre class="code"><span class="info file"># File 'lib/compony/components/with_form.rb', line 7</span>
312
+
313
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>...</span><span class='rparen'>)</span>
314
+ <span class='comment'># TODO: On the next line, use Compony.path instead? Likely, this was implemented before that method existed.
315
+ </span> <span class='ivar'>@submit_path_block</span> <span class='op'>=</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_controller'>controller</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_controller'>controller</span><span class='period'>.</span><span class='id identifier rubyid_helpers'>helpers</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='const'><span class='object_link'><a href="../../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_path_helper_name'><span class='object_link'><a href="../../Compony.html#path_helper_name-class_method" title="Compony.path_helper_name (method)">path_helper_name</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name'>comp_name</span><span class='comma'>,</span> <span class='id identifier rubyid_family_name'>family_name</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>_path</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='rbrace'>}</span>
316
+ <span class='kw'>super</span>
317
+ <span class='kw'>end</span></pre>
318
+ </td>
319
+ </tr>
320
+ </table>
321
+ </div>
322
+
323
+ </div>
324
+
325
+
326
+ <div id="instance_method_details" class="method_details_list">
327
+ <h2>Instance Method Details</h2>
328
+
329
+
330
+ <div class="method_details first">
331
+ <h3 class="signature first" id="form_comp-instance_method">
332
+
333
+ #<strong>form_comp</strong> &#x21d2; <tt>Object</tt>
334
+
335
+
336
+
337
+
338
+
339
+ </h3><div class="docstring">
340
+ <div class="discussion">
341
+
342
+ <p>Returns an instance of the form component responsible for rendering the form. Feel free to override this in subclasses.</p>
343
+
344
+
345
+ </div>
346
+ </div>
347
+ <div class="tags">
348
+
349
+
350
+ </div><table class="source_code">
351
+ <tr>
352
+ <td>
353
+ <pre class="lines">
354
+
355
+
356
+ 15
357
+ 16
358
+ 17
359
+ 18
360
+ 19
361
+ 20
362
+ 21
363
+ 22</pre>
364
+ </td>
365
+ <td>
366
+ <pre class="code"><span class="info file"># File 'lib/compony/components/with_form.rb', line 15</span>
367
+
368
+ <span class='kw'>def</span> <span class='id identifier rubyid_form_comp'>form_comp</span>
369
+ <span class='ivar'>@form_comp</span> <span class='op'>||=</span> <span class='lparen'>(</span><span class='id identifier rubyid_form_comp_class'>form_comp_class</span> <span class='op'>||</span> <span class='id identifier rubyid_comp_class_for!'>comp_class_for!</span><span class='lparen'>(</span><span class='symbol'>:form</span><span class='comma'>,</span> <span class='id identifier rubyid_family_cst'>family_cst</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
370
+ <span class='kw'>self</span><span class='comma'>,</span>
371
+ <span class='label'>submit_verb:</span><span class='comma'>,</span>
372
+ <span class='comment'># If applicable, Rails adds the route keys automatically, thus, e.g. :id does not need to be passed here, as it comes from the request.
373
+ </span> <span class='label'>submit_path:</span> <span class='ivar'>@submit_path_block</span>
374
+ <span class='rparen'>)</span>
375
+ <span class='kw'>end</span></pre>
376
+ </td>
377
+ </tr>
378
+ </table>
379
+ </div>
380
+
381
+ <div class="method_details ">
382
+ <h3 class="signature " id="form_comp_class-instance_method">
383
+
384
+ #<strong>form_comp_class</strong>(new_form_comp_class = nil) &#x21d2; <tt>Object</tt>
385
+
386
+
387
+
388
+
389
+
390
+ </h3><div class="docstring">
391
+ <div class="discussion">
392
+
393
+ <p>DSL method Overrides the form comp class that is instanciated to render the form</p>
394
+
395
+
396
+ </div>
397
+ </div>
398
+ <div class="tags">
399
+
400
+
401
+ </div><table class="source_code">
402
+ <tr>
403
+ <td>
404
+ <pre class="lines">
405
+
406
+
407
+ 38
408
+ 39
409
+ 40</pre>
410
+ </td>
411
+ <td>
412
+ <pre class="code"><span class="info file"># File 'lib/compony/components/with_form.rb', line 38</span>
413
+
414
+ <span class='kw'>def</span> <span class='id identifier rubyid_form_comp_class'>form_comp_class</span><span class='lparen'>(</span><span class='id identifier rubyid_new_form_comp_class'>new_form_comp_class</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
415
+ <span class='ivar'>@form_comp_class</span> <span class='op'>||=</span> <span class='id identifier rubyid_new_form_comp_class'>new_form_comp_class</span>
416
+ <span class='kw'>end</span></pre>
417
+ </td>
418
+ </tr>
419
+ </table>
420
+ </div>
421
+
422
+ <div class="method_details ">
423
+ <h3 class="signature " id="submit_path-instance_method">
424
+
425
+ #<strong>submit_path</strong>(&amp;new_submit_path_block) &#x21d2; <tt>Object</tt>
426
+
427
+
428
+
429
+
430
+
431
+ </h3><div class="docstring">
432
+ <div class="discussion">
433
+
434
+ <p>DSL method Overrides the submit path which would otherwise default to this component This takes a block that will be called and given a controller</p>
435
+
436
+
437
+ </div>
438
+ </div>
439
+ <div class="tags">
440
+
441
+
442
+ </div><table class="source_code">
443
+ <tr>
444
+ <td>
445
+ <pre class="lines">
446
+
447
+
448
+ 45
449
+ 46
450
+ 47</pre>
451
+ </td>
452
+ <td>
453
+ <pre class="code"><span class="info file"># File 'lib/compony/components/with_form.rb', line 45</span>
454
+
455
+ <span class='kw'>def</span> <span class='id identifier rubyid_submit_path'>submit_path</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_new_submit_path_block'>new_submit_path_block</span><span class='rparen'>)</span>
456
+ <span class='ivar'>@submit_path_block</span> <span class='op'>=</span> <span class='id identifier rubyid_new_submit_path_block'>new_submit_path_block</span>
457
+ <span class='kw'>end</span></pre>
458
+ </td>
459
+ </tr>
460
+ </table>
461
+ </div>
462
+
463
+ <div class="method_details ">
464
+ <h3 class="signature " id="submit_verb-instance_method">
465
+
466
+ #<strong>submit_verb</strong>(new_submit_verb = nil) &#x21d2; <tt>Object</tt>
467
+
468
+
469
+
470
+
471
+
472
+ </h3><div class="docstring">
473
+ <div class="discussion">
474
+
475
+ <p>DSL method Sets or returns the previously set submit verb</p>
476
+
477
+
478
+ </div>
479
+ </div>
480
+ <div class="tags">
481
+
482
+
483
+ </div><table class="source_code">
484
+ <tr>
485
+ <td>
486
+ <pre class="lines">
487
+
488
+
489
+ 26
490
+ 27
491
+ 28
492
+ 29
493
+ 30
494
+ 31
495
+ 32
496
+ 33
497
+ 34</pre>
498
+ </td>
499
+ <td>
500
+ <pre class="code"><span class="info file"># File 'lib/compony/components/with_form.rb', line 26</span>
501
+
502
+ <span class='kw'>def</span> <span class='id identifier rubyid_submit_verb'>submit_verb</span><span class='lparen'>(</span><span class='id identifier rubyid_new_submit_verb'>new_submit_verb</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
503
+ <span class='kw'>if</span> <span class='id identifier rubyid_new_submit_verb'>new_submit_verb</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
504
+ <span class='id identifier rubyid_new_submit_verb'>new_submit_verb</span> <span class='op'>=</span> <span class='id identifier rubyid_new_submit_verb'>new_submit_verb</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
505
+ <span class='id identifier rubyid_available_verbs'>available_verbs</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../ComponentMixins.html" title="Compony::ComponentMixins (module)">ComponentMixins</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../ComponentMixins/Default.html" title="Compony::ComponentMixins::Default (module)">Default</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../ComponentMixins/Default/Standalone.html" title="Compony::ComponentMixins::Default::Standalone (module)">Standalone</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../ComponentMixins/Default/Standalone/VerbDsl.html" title="Compony::ComponentMixins::Default::Standalone::VerbDsl (class)">VerbDsl</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../ComponentMixins/Default/Standalone/VerbDsl.html#AVAILABLE_VERBS-constant" title="Compony::ComponentMixins::Default::Standalone::VerbDsl::AVAILABLE_VERBS (constant)">AVAILABLE_VERBS</a></span></span>
506
+ <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_new_submit_verb'>new_submit_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='id identifier rubyid_available_verbs'>available_verbs</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='id identifier rubyid_available_verbs'>available_verbs</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_new_submit_verb'>new_submit_verb</span><span class='rparen'>)</span>
507
+ <span class='ivar'>@submit_verb</span> <span class='op'>=</span> <span class='id identifier rubyid_new_submit_verb'>new_submit_verb</span>
508
+ <span class='kw'>end</span>
509
+ <span class='kw'>return</span> <span class='ivar'>@submit_verb</span> <span class='op'>||</span> <span class='id identifier rubyid_fail'>fail</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>WithForm component </span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='embexpr_end'>}</span><span class='tstring_content'> is missing a call to `submit_verb`.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
510
+ <span class='kw'>end</span></pre>
511
+ </td>
512
+ </tr>
513
+ </table>
514
+ </div>
515
+
516
+ </div>
517
+
518
+ </div>
519
+
520
+ <div id="footer">
521
+ Generated on Sat Apr 27 10:22:12 2024 by
522
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
523
+ 0.9.34 (ruby-3.2.2).
524
+ </div>
525
+
526
+ </div>
527
+ </body>
528
+ </html>
@@ -0,0 +1,126 @@
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
+ Module: Compony::Components
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::Components";
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 (C)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony</a></span></span>
41
+ &raquo;
42
+ <span class="title">Components</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>Module: Compony::Components
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/compony/components/new.rb<span class="defines">,<br />
82
+ lib/compony/components/edit.rb,<br /> lib/compony/components/form.rb,<br /> lib/compony/components/button.rb,<br /> lib/compony/components/destroy.rb,<br /> lib/compony/components/with_form.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <div class="docstring">
89
+ <div class="discussion">
90
+
91
+
92
+ </div>
93
+ </div>
94
+ <div class="tags">
95
+
96
+
97
+ </div><h2>Defined Under Namespace</h2>
98
+ <p class="children">
99
+
100
+
101
+
102
+
103
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Components/Button.html" title="Compony::Components::Button (class)">Button</a></span>, <span class='object_link'><a href="Components/Destroy.html" title="Compony::Components::Destroy (class)">Destroy</a></span>, <span class='object_link'><a href="Components/Edit.html" title="Compony::Components::Edit (class)">Edit</a></span>, <span class='object_link'><a href="Components/Form.html" title="Compony::Components::Form (class)">Form</a></span>, <span class='object_link'><a href="Components/New.html" title="Compony::Components::New (class)">New</a></span>, <span class='object_link'><a href="Components/WithForm.html" title="Compony::Components::WithForm (class)">WithForm</a></span>
104
+
105
+
106
+ </p>
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ </div>
117
+
118
+ <div id="footer">
119
+ Generated on Sat Apr 27 10:22:11 2024 by
120
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
+ 0.9.34 (ruby-3.2.2).
122
+ </div>
123
+
124
+ </div>
125
+ </body>
126
+ </html>