compony 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/Gemfile.lock +1 -1
- data/README.md +10 -14
- data/VERSION +1 -1
- data/compony.gemspec +4 -4
- data/doc/ComponentGenerator.html +1 -1
- data/doc/Components.html +1 -1
- data/doc/ComponentsGenerator.html +1 -1
- data/doc/Compony/Component.html +193 -457
- data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +3 -3
- data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone.html +187 -1
- data/doc/Compony/ComponentMixins/Default.html +1 -1
- data/doc/Compony/ComponentMixins/Resourceful.html +2 -2
- data/doc/Compony/ComponentMixins.html +1 -1
- data/doc/Compony/Components/Button.html +2 -2
- data/doc/Compony/Components/Buttons/CssButton.html +282 -0
- data/doc/Compony/Components/Buttons/Link.html +252 -0
- data/doc/Compony/Components/Buttons.html +126 -0
- data/doc/Compony/Components/Destroy.html +11 -11
- data/doc/Compony/Components/Edit.html +14 -14
- data/doc/Compony/Components/Form.html +100 -100
- data/doc/Compony/Components/Index.html +2 -2
- data/doc/Compony/Components/List.html +3 -3
- data/doc/Compony/Components/New.html +2 -2
- data/doc/Compony/Components/Show.html +24 -24
- data/doc/Compony/Components/WithForm.html +3 -3
- data/doc/Compony/Components.html +5 -3
- data/doc/Compony/ControllerMixin.html +2 -2
- data/doc/Compony/Engine.html +1 -1
- data/doc/Compony/ExposedIntentsDsl.html +403 -0
- data/doc/Compony/Intent.html +1503 -0
- data/doc/Compony/MethodAccessibleHash.html +1 -1
- data/doc/Compony/ModelFields/Anchormodel.html +1 -1
- data/doc/Compony/ModelFields/Association.html +2 -2
- data/doc/Compony/ModelFields/Attachment.html +1 -1
- data/doc/Compony/ModelFields/Base.html +1 -1
- data/doc/Compony/ModelFields/Boolean.html +1 -1
- data/doc/Compony/ModelFields/Color.html +1 -1
- data/doc/Compony/ModelFields/Currency.html +1 -1
- data/doc/Compony/ModelFields/Date.html +1 -1
- data/doc/Compony/ModelFields/Datetime.html +1 -1
- data/doc/Compony/ModelFields/Decimal.html +1 -1
- data/doc/Compony/ModelFields/Email.html +1 -1
- data/doc/Compony/ModelFields/Float.html +1 -1
- data/doc/Compony/ModelFields/Integer.html +1 -1
- data/doc/Compony/ModelFields/Percentage.html +1 -1
- data/doc/Compony/ModelFields/Phone.html +1 -1
- data/doc/Compony/ModelFields/RichText.html +1 -1
- data/doc/Compony/ModelFields/String.html +1 -1
- data/doc/Compony/ModelFields/Text.html +1 -1
- data/doc/Compony/ModelFields/Time.html +1 -1
- data/doc/Compony/ModelFields/Url.html +1 -1
- data/doc/Compony/ModelFields.html +1 -1
- data/doc/Compony/ModelMixin.html +1 -1
- data/doc/Compony/NaturalOrdering.html +1 -1
- data/doc/Compony/RequestContext.html +177 -14
- data/doc/Compony/Version.html +1 -1
- data/doc/Compony/ViewHelpers.html +15 -272
- data/doc/Compony/VirtualModel.html +1 -1
- data/doc/Compony.html +303 -837
- data/doc/ComponyController.html +1 -1
- data/doc/_index.html +30 -2
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +11 -18
- data/doc/guide/basic_component.md +12 -8
- data/doc/guide/example.md +17 -17
- data/doc/guide/feasibility.md +4 -2
- data/doc/guide/generators.md +4 -2
- data/doc/guide/inheritance.md +4 -2
- data/doc/guide/installation.md +4 -2
- data/doc/guide/intents.md +167 -0
- data/doc/guide/internal_datastructures.md +4 -2
- data/doc/guide/model_fields.md +4 -2
- data/doc/guide/nesting.md +5 -3
- data/doc/guide/ownership.md +5 -3
- data/doc/guide/pre_built_components/destroy.md +3 -3
- data/doc/guide/pre_built_components/edit.md +1 -1
- data/doc/guide/pre_built_components/form.md +1 -1
- data/doc/guide/pre_built_components/index.md +1 -1
- data/doc/guide/pre_built_components/list.md +1 -1
- data/doc/guide/pre_built_components/new.md +2 -2
- data/doc/guide/pre_built_components/show.md +1 -1
- data/doc/guide/pre_built_components/with_form.md +1 -1
- data/doc/guide/pre_built_components.md +4 -3
- data/doc/guide/resourceful.md +5 -3
- data/doc/guide/standalone.md +10 -2
- data/doc/guide/virtual_models.md +4 -2
- data/doc/index.html +11 -18
- data/doc/method_list.html +273 -161
- data/doc/top-level-namespace.html +1 -1
- data/lib/compony/component.rb +19 -48
- data/lib/compony/component_mixins/default/standalone/standalone_dsl.rb +2 -2
- data/lib/compony/component_mixins/default/standalone.rb +16 -0
- data/lib/compony/component_mixins/resourceful.rb +1 -1
- data/lib/compony/components/buttons/css_button.rb +32 -0
- data/lib/compony/components/buttons/link.rb +31 -0
- data/lib/compony/components/destroy.rb +9 -8
- data/lib/compony/components/edit.rb +5 -4
- data/lib/compony/components/form.rb +7 -1
- data/lib/compony/components/index.rb +2 -2
- data/lib/compony/components/list.rb +4 -4
- data/lib/compony/components/new.rb +1 -1
- data/lib/compony/components/show.rb +8 -11
- data/lib/compony/components/with_form.rb +1 -1
- data/lib/compony/exposed_intents_dsl.rb +29 -0
- data/lib/compony/intent.rb +145 -0
- data/lib/compony/model_fields/association.rb +1 -1
- data/lib/compony/request_context.rb +21 -0
- data/lib/compony/view_helpers.rb +5 -48
- data/lib/compony.rb +63 -149
- metadata +12 -6
- data/doc/guide/helpers.md +0 -156
- data/doc/guide/pre_built_components/button.md +0 -8
- data/doc/guide/root_actions.md +0 -67
- data/lib/compony/components/button.rb +0 -61
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
|
|
290
290
|
|
|
291
291
|
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Component.html" title="Compony::Component (class)">Compony::Component</a></span></h3>
|
|
292
|
-
<p class="inherited"><span class='object_link'><a href="../Component.html#
|
|
292
|
+
<p class="inherited"><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_name-class_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#exposed_intents-instance_method" title="Compony::Component#exposed_intents (method)">#exposed_intents</a></span>, <span class='object_link'><a href="../Component.html#family_name-class_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#id_path-instance_method" title="Compony::Component#id_path (method)">#id_path</a></span>, <span class='object_link'><a href="../Component.html#id_path_hash-instance_method" title="Compony::Component#id_path_hash (method)">#id_path_hash</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#remove_content-instance_method" title="Compony::Component#remove_content (method)">#remove_content</a></span>, <span class='object_link'><a href="../Component.html#remove_content!-instance_method" title="Compony::Component#remove_content! (method)">#remove_content!</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#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#sub_comp-instance_method" title="Compony::Component#sub_comp (method)">#sub_comp</a></span></p>
|
|
293
293
|
<div id="constructor_details" class="method_details_list">
|
|
294
294
|
<h2>Constructor Details</h2>
|
|
295
295
|
|
|
@@ -341,14 +341,14 @@
|
|
|
341
341
|
<pre class="lines">
|
|
342
342
|
|
|
343
343
|
|
|
344
|
+
60
|
|
345
|
+
61
|
|
346
|
+
62
|
|
344
347
|
63
|
|
345
|
-
64
|
|
346
|
-
65
|
|
347
|
-
66
|
|
348
|
-
67</pre>
|
|
348
|
+
64</pre>
|
|
349
349
|
</td>
|
|
350
350
|
<td>
|
|
351
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line
|
|
351
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line 60</span>
|
|
352
352
|
|
|
353
353
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='comma'>,</span> <span class='label'>skip_columns:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span>
|
|
354
354
|
<span class='ivar'>@columns</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../NaturalOrdering.html" title="Compony::NaturalOrdering (class)">NaturalOrdering</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
|
@@ -413,12 +413,12 @@
|
|
|
413
413
|
<pre class="lines">
|
|
414
414
|
|
|
415
415
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
416
|
+
108
|
|
417
|
+
109
|
|
418
|
+
110</pre>
|
|
419
419
|
</td>
|
|
420
420
|
<td>
|
|
421
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line
|
|
421
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line 108</span>
|
|
422
422
|
|
|
423
423
|
<span class='kw'>def</span> <span class='id identifier rubyid_all_field_columns'>all_field_columns</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
|
|
424
424
|
<span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_fields'>fields</span><span class='period'>.</span><span class='id identifier rubyid_each_key'>each_key</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_field_name'>field_name</span><span class='op'>|</span> <span class='id identifier rubyid_column'>column</span><span class='lparen'>(</span><span class='id identifier rubyid_field_name'>field_name</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
@@ -562,6 +562,9 @@
|
|
|
562
562
|
<pre class="lines">
|
|
563
563
|
|
|
564
564
|
|
|
565
|
+
73
|
|
566
|
+
74
|
|
567
|
+
75
|
|
565
568
|
76
|
|
566
569
|
77
|
|
567
570
|
78
|
|
@@ -574,13 +577,10 @@
|
|
|
574
577
|
85
|
|
575
578
|
86
|
|
576
579
|
87
|
|
577
|
-
88
|
|
578
|
-
89
|
|
579
|
-
90
|
|
580
|
-
91</pre>
|
|
580
|
+
88</pre>
|
|
581
581
|
</td>
|
|
582
582
|
<td>
|
|
583
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line
|
|
583
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line 73</span>
|
|
584
584
|
|
|
585
585
|
<span class='kw'>def</span> <span class='id identifier rubyid_column'>column</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>label:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>class:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>link_opts:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='label'>link_to_component:</span> <span class='symbol'>:show</span><span class='comma'>,</span> <span class='op'>**</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
586
586
|
<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>
|
|
@@ -649,12 +649,12 @@
|
|
|
649
649
|
<pre class="lines">
|
|
650
650
|
|
|
651
651
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
652
|
+
93
|
|
653
|
+
94
|
|
654
|
+
95</pre>
|
|
655
655
|
</td>
|
|
656
656
|
<td>
|
|
657
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line
|
|
657
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line 93</span>
|
|
658
658
|
|
|
659
659
|
<span class='kw'>def</span> <span class='id identifier rubyid_columns'>columns</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_col_names'>col_names</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span>
|
|
660
660
|
<span class='id identifier rubyid_col_names'>col_names</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_col_name'>col_name</span><span class='op'>|</span> <span class='id identifier rubyid_column'>column</span><span class='lparen'>(</span><span class='id identifier rubyid_col_name'>col_name</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
@@ -710,12 +710,12 @@
|
|
|
710
710
|
<pre class="lines">
|
|
711
711
|
|
|
712
712
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
713
|
+
101
|
|
714
|
+
102
|
|
715
|
+
103</pre>
|
|
716
716
|
</td>
|
|
717
717
|
<td>
|
|
718
|
-
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line
|
|
718
|
+
<pre class="code"><span class="info file"># File 'lib/compony/components/show.rb', line 101</span>
|
|
719
719
|
|
|
720
720
|
<span class='kw'>def</span> <span class='id identifier rubyid_skip_column'>skip_column</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
721
721
|
<span class='ivar'>@skipped_columns</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>
|
|
@@ -730,7 +730,7 @@
|
|
|
730
730
|
</div>
|
|
731
731
|
|
|
732
732
|
<div id="footer">
|
|
733
|
-
Generated on Thu Nov
|
|
733
|
+
Generated on Thu Nov 27 16:02:22 2025 by
|
|
734
734
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
735
735
|
0.9.34 (ruby-3.3.5).
|
|
736
736
|
</div>
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
|
|
296
296
|
|
|
297
297
|
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Component.html" title="Compony::Component (class)">Compony::Component</a></span></h3>
|
|
298
|
-
<p class="inherited"><span class='object_link'><a href="../Component.html#
|
|
298
|
+
<p class="inherited"><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_name-class_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#exposed_intents-instance_method" title="Compony::Component#exposed_intents (method)">#exposed_intents</a></span>, <span class='object_link'><a href="../Component.html#family_name-class_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#id_path-instance_method" title="Compony::Component#id_path (method)">#id_path</a></span>, <span class='object_link'><a href="../Component.html#id_path_hash-instance_method" title="Compony::Component#id_path_hash (method)">#id_path_hash</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#remove_content-instance_method" title="Compony::Component#remove_content (method)">#remove_content</a></span>, <span class='object_link'><a href="../Component.html#remove_content!-instance_method" title="Compony::Component#remove_content! (method)">#remove_content!</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#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#sub_comp-instance_method" title="Compony::Component#sub_comp (method)">#sub_comp</a></span></p>
|
|
299
299
|
<div id="constructor_details" class="method_details_list">
|
|
300
300
|
<h2>Constructor Details</h2>
|
|
301
301
|
|
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
<pre class="code"><span class="info file"># File 'lib/compony/components/with_form.rb', line 15</span>
|
|
439
439
|
|
|
440
440
|
<span class='kw'>def</span> <span class='id identifier rubyid_form_comp'>form_comp</span>
|
|
441
|
-
<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='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_comp_class_for!'><span class='object_link'><a href="../../Compony.html#comp_class_for!-class_method" title="Compony.comp_class_for! (method)">comp_class_for!</a></span></span><span class='lparen'>(</span><span class='symbol'>:form</span><span class='comma'>,</span> <span class='id identifier
|
|
441
|
+
<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='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_comp_class_for!'><span class='object_link'><a href="../../Compony.html#comp_class_for!-class_method" title="Compony.comp_class_for! (method)">comp_class_for!</a></span></span><span class='lparen'>(</span><span class='symbol'>:form</span><span class='comma'>,</span> <span class='id identifier rubyid_family_name'>family_name</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>
|
|
442
442
|
<span class='kw'>self</span><span class='comma'>,</span>
|
|
443
443
|
<span class='label'>submit_verb:</span><span class='comma'>,</span>
|
|
444
444
|
<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.
|
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
</div>
|
|
592
592
|
|
|
593
593
|
<div id="footer">
|
|
594
|
-
Generated on Thu Nov
|
|
594
|
+
Generated on Thu Nov 27 16:02:23 2025 by
|
|
595
595
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
596
596
|
0.9.34 (ruby-3.3.5).
|
|
597
597
|
</div>
|
data/doc/Compony/Components.html
CHANGED
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
<dl>
|
|
80
80
|
<dt>Defined in:</dt>
|
|
81
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/list.rb,<br /> lib/compony/components/show.rb,<br /> lib/compony/components/index.rb,<br /> lib/compony/components/
|
|
82
|
+
lib/compony/components/edit.rb,<br /> lib/compony/components/form.rb,<br /> lib/compony/components/list.rb,<br /> lib/compony/components/show.rb,<br /> lib/compony/components/index.rb,<br /> lib/compony/components/destroy.rb,<br /> lib/compony/components/with_form.rb,<br /> lib/compony/components/buttons/link.rb,<br /> lib/compony/components/buttons/css_button.rb</span>
|
|
83
83
|
</dd>
|
|
84
84
|
</dl>
|
|
85
85
|
|
|
@@ -98,9 +98,11 @@
|
|
|
98
98
|
<p class="children">
|
|
99
99
|
|
|
100
100
|
|
|
101
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Components/Buttons.html" title="Compony::Components::Buttons (module)">Buttons</a></span>
|
|
102
|
+
|
|
101
103
|
|
|
102
104
|
|
|
103
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Components/
|
|
105
|
+
<strong class="classes">Classes:</strong> <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/Index.html" title="Compony::Components::Index (class)">Index</a></span>, <span class='object_link'><a href="Components/List.html" title="Compony::Components::List (class)">List</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/Show.html" title="Compony::Components::Show (class)">Show</a></span>, <span class='object_link'><a href="Components/WithForm.html" title="Compony::Components::WithForm (class)">WithForm</a></span>
|
|
104
106
|
|
|
105
107
|
|
|
106
108
|
</p>
|
|
@@ -116,7 +118,7 @@
|
|
|
116
118
|
</div>
|
|
117
119
|
|
|
118
120
|
<div id="footer">
|
|
119
|
-
Generated on Thu Nov
|
|
121
|
+
Generated on Thu Nov 27 16:02:22 2025 by
|
|
120
122
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
121
123
|
0.9.34 (ruby-3.3.5).
|
|
122
124
|
</div>
|
|
@@ -120,13 +120,13 @@
|
|
|
120
120
|
<h2>Method Summary</h2>
|
|
121
121
|
|
|
122
122
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="ViewHelpers.html" title="Compony::ViewHelpers (module)">ViewHelpers</a></span></h3>
|
|
123
|
-
<p class="inherited"><span class='object_link'><a href="ViewHelpers.html#
|
|
123
|
+
<p class="inherited"><span class='object_link'><a href="ViewHelpers.html#render_intent-instance_method" title="Compony::ViewHelpers#render_intent (method)">#render_intent</a></span></p>
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
</div>
|
|
127
127
|
|
|
128
128
|
<div id="footer">
|
|
129
|
-
Generated on Thu Nov
|
|
129
|
+
Generated on Thu Nov 27 16:02:22 2025 by
|
|
130
130
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
131
131
|
0.9.34 (ruby-3.3.5).
|
|
132
132
|
</div>
|
data/doc/Compony/Engine.html
CHANGED
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
</div>
|
|
124
124
|
|
|
125
125
|
<div id="footer">
|
|
126
|
-
Generated on Thu Nov
|
|
126
|
+
Generated on Thu Nov 27 16:02:22 2025 by
|
|
127
127
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
128
128
|
0.9.34 (ruby-3.3.5).
|
|
129
129
|
</div>
|
|
@@ -0,0 +1,403 @@
|
|
|
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::ExposedIntentsDsl
|
|
8
|
+
|
|
9
|
+
— 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::ExposedIntentsDsl";
|
|
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 (E)</a> »
|
|
40
|
+
<span class='title'><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony</a></span></span>
|
|
41
|
+
»
|
|
42
|
+
<span class="title">ExposedIntentsDsl</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::ExposedIntentsDsl
|
|
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::ExposedIntentsDsl</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/exposed_intents_dsl.rb</dd>
|
|
100
|
+
</dl>
|
|
101
|
+
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div class="docstring">
|
|
105
|
+
<div class="discussion">
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<div class="tags">
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
<h2>
|
|
122
|
+
Instance Method Summary
|
|
123
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
124
|
+
</h2>
|
|
125
|
+
|
|
126
|
+
<ul class="summary">
|
|
127
|
+
|
|
128
|
+
<li class="protected ">
|
|
129
|
+
<span class="summary_signature">
|
|
130
|
+
|
|
131
|
+
<a href="#add-instance_method" title="#add (instance method)">#<strong>add</strong>(before: nil) ⇒ Object </a>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
</span>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
<span class="note title protected">protected</span>
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
<span class="summary_desc"><div class='inline'>
|
|
146
|
+
<p>DSL method Adds or replaces an intent to those exposed by the component based on the intent name (override the name if you need to avoid a naming collision).</p>
|
|
147
|
+
</div></span>
|
|
148
|
+
|
|
149
|
+
</li>
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
<li class="public ">
|
|
153
|
+
<span class="summary_signature">
|
|
154
|
+
|
|
155
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(previously_exposed_intents) ⇒ ExposedIntentsDsl </a>
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
</span>
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
<span class="note title constructor">constructor</span>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
<span class="summary_desc"><div class='inline'>
|
|
172
|
+
<p>A new instance of ExposedIntentsDsl.</p>
|
|
173
|
+
</div></span>
|
|
174
|
+
|
|
175
|
+
</li>
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
<li class="protected ">
|
|
179
|
+
<span class="summary_signature">
|
|
180
|
+
|
|
181
|
+
<a href="#remove-instance_method" title="#remove (instance method)">#<strong>remove</strong>(intent_name) ⇒ Object </a>
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
</span>
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
<span class="note title protected">protected</span>
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
<span class="summary_desc"><div class='inline'>
|
|
196
|
+
<p>DSL method Removes an exposed intent previously added to this component.</p>
|
|
197
|
+
</div></span>
|
|
198
|
+
|
|
199
|
+
</li>
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
</ul>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
<div id="constructor_details" class="method_details_list">
|
|
207
|
+
<h2>Constructor Details</h2>
|
|
208
|
+
|
|
209
|
+
<div class="method_details first">
|
|
210
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
211
|
+
|
|
212
|
+
#<strong>initialize</strong>(previously_exposed_intents) ⇒ <tt><span class='object_link'><a href="" title="Compony::ExposedIntentsDsl (class)">ExposedIntentsDsl</a></span></tt>
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
</h3><div class="docstring">
|
|
219
|
+
<div class="discussion">
|
|
220
|
+
|
|
221
|
+
<p>Returns a new instance of ExposedIntentsDsl.</p>
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
</div>
|
|
225
|
+
</div>
|
|
226
|
+
<div class="tags">
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
</div><table class="source_code">
|
|
230
|
+
<tr>
|
|
231
|
+
<td>
|
|
232
|
+
<pre class="lines">
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
3
|
|
236
|
+
4
|
|
237
|
+
5
|
|
238
|
+
6</pre>
|
|
239
|
+
</td>
|
|
240
|
+
<td>
|
|
241
|
+
<pre class="code"><span class="info file"># File 'lib/compony/exposed_intents_dsl.rb', line 3</span>
|
|
242
|
+
|
|
243
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_previously_exposed_intents'>previously_exposed_intents</span><span class='rparen'>)</span>
|
|
244
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
|
245
|
+
<span class='ivar'>@exposed_intents</span> <span class='op'>=</span> <span class='id identifier rubyid_previously_exposed_intents'>previously_exposed_intents</span>
|
|
246
|
+
<span class='kw'>end</span></pre>
|
|
247
|
+
</td>
|
|
248
|
+
</tr>
|
|
249
|
+
</table>
|
|
250
|
+
</div>
|
|
251
|
+
|
|
252
|
+
</div>
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
<div id="instance_method_details" class="method_details_list">
|
|
256
|
+
<h2>Instance Method Details</h2>
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
<div class="method_details first">
|
|
260
|
+
<h3 class="signature first" id="add-instance_method">
|
|
261
|
+
|
|
262
|
+
#<strong>add</strong>(before: nil) ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
</h3><div class="docstring">
|
|
269
|
+
<div class="discussion">
|
|
270
|
+
|
|
271
|
+
<p>DSL method Adds or replaces an intent to those exposed by the component based on the intent name (override the name if you need to avoid a naming collision). Intents specified this way can be retrieved and rendered by the parent component or by calling <code>root_intents</code> in case of standalone access.</p>
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
<div class="tags">
|
|
277
|
+
<p class="tag_title">Parameters:</p>
|
|
278
|
+
<ul class="param">
|
|
279
|
+
|
|
280
|
+
<li>
|
|
281
|
+
|
|
282
|
+
<span class='name'>before</span>
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
<span class='type'>(<tt>Symbol</tt>)</span>
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
—
|
|
292
|
+
<div class='inline'>
|
|
293
|
+
<p>If specified, will insert the intent before the other. When replacing, an element keeps its position unless ‘before:“ is passed.</p>
|
|
294
|
+
</div>
|
|
295
|
+
|
|
296
|
+
</li>
|
|
297
|
+
|
|
298
|
+
</ul>
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
</div><table class="source_code">
|
|
302
|
+
<tr>
|
|
303
|
+
<td>
|
|
304
|
+
<pre class="lines">
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
14
|
|
308
|
+
15
|
|
309
|
+
16
|
|
310
|
+
17</pre>
|
|
311
|
+
</td>
|
|
312
|
+
<td>
|
|
313
|
+
<pre class="code"><span class="info file"># File 'lib/compony/exposed_intents_dsl.rb', line 14</span>
|
|
314
|
+
|
|
315
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>*</span><span class='comma'>,</span> <span class='label'>before:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span>
|
|
316
|
+
<span class='id identifier rubyid_intent'>intent</span> <span class='op'>=</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_intent'><span class='object_link'><a href="../Compony.html#intent-class_method" title="Compony.intent (method)">intent</a></span></span><span class='lparen'>(</span><span class='op'>*</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span>
|
|
317
|
+
<span class='ivar'>@exposed_intents</span><span class='period'>.</span><span class='id identifier rubyid_natural_push'>natural_push</span><span class='lparen'>(</span><span class='id identifier rubyid_intent'>intent</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_intent'>intent</span><span class='comma'>,</span> <span class='label'>before:</span><span class='rparen'>)</span>
|
|
318
|
+
<span class='kw'>end</span></pre>
|
|
319
|
+
</td>
|
|
320
|
+
</tr>
|
|
321
|
+
</table>
|
|
322
|
+
</div>
|
|
323
|
+
|
|
324
|
+
<div class="method_details ">
|
|
325
|
+
<h3 class="signature " id="remove-instance_method">
|
|
326
|
+
|
|
327
|
+
#<strong>remove</strong>(intent_name) ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
</h3><div class="docstring">
|
|
334
|
+
<div class="discussion">
|
|
335
|
+
|
|
336
|
+
<p>DSL method Removes an exposed intent previously added to this component</p>
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
<div class="tags">
|
|
342
|
+
<p class="tag_title">Parameters:</p>
|
|
343
|
+
<ul class="param">
|
|
344
|
+
|
|
345
|
+
<li>
|
|
346
|
+
|
|
347
|
+
<span class='name'>intent_name</span>
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
<span class='type'>(<tt>Symbol</tt>)</span>
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
—
|
|
355
|
+
<div class='inline'>
|
|
356
|
+
<p>The name of the intent to remove</p>
|
|
357
|
+
</div>
|
|
358
|
+
|
|
359
|
+
</li>
|
|
360
|
+
|
|
361
|
+
</ul>
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
</div><table class="source_code">
|
|
365
|
+
<tr>
|
|
366
|
+
<td>
|
|
367
|
+
<pre class="lines">
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
22
|
|
371
|
+
23
|
|
372
|
+
24
|
|
373
|
+
25
|
|
374
|
+
26
|
|
375
|
+
27</pre>
|
|
376
|
+
</td>
|
|
377
|
+
<td>
|
|
378
|
+
<pre class="code"><span class="info file"># File 'lib/compony/exposed_intents_dsl.rb', line 22</span>
|
|
379
|
+
|
|
380
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='id identifier rubyid_intent_name'>intent_name</span><span class='rparen'>)</span>
|
|
381
|
+
<span class='id identifier rubyid_existing_index'>existing_index</span> <span class='op'>=</span> <span class='ivar'>@exposed_intents</span><span class='period'>.</span><span class='id identifier rubyid_find_index'>find_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_el'>el</span><span class='op'>|</span> <span class='id identifier rubyid_el'>el</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='id identifier rubyid_intent_name'>intent_name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='rbrace'>}</span>
|
|
382
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_existing_index'>existing_index</span>
|
|
383
|
+
<span class='ivar'>@exposed_intents</span><span class='period'>.</span><span class='id identifier rubyid_delete_at'>delete_at</span><span class='lparen'>(</span><span class='id identifier rubyid_existing_index'>existing_index</span><span class='rparen'>)</span>
|
|
384
|
+
<span class='kw'>end</span>
|
|
385
|
+
<span class='kw'>end</span></pre>
|
|
386
|
+
</td>
|
|
387
|
+
</tr>
|
|
388
|
+
</table>
|
|
389
|
+
</div>
|
|
390
|
+
|
|
391
|
+
</div>
|
|
392
|
+
|
|
393
|
+
</div>
|
|
394
|
+
|
|
395
|
+
<div id="footer">
|
|
396
|
+
Generated on Thu Nov 27 16:02:23 2025 by
|
|
397
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
398
|
+
0.9.34 (ruby-3.3.5).
|
|
399
|
+
</div>
|
|
400
|
+
|
|
401
|
+
</div>
|
|
402
|
+
</body>
|
|
403
|
+
</html>
|