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.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +10 -14
  5. data/VERSION +1 -1
  6. data/compony.gemspec +4 -4
  7. data/doc/ComponentGenerator.html +1 -1
  8. data/doc/Components.html +1 -1
  9. data/doc/ComponentsGenerator.html +1 -1
  10. data/doc/Compony/Component.html +193 -457
  11. data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
  12. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
  13. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +3 -3
  14. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
  15. data/doc/Compony/ComponentMixins/Default/Standalone.html +187 -1
  16. data/doc/Compony/ComponentMixins/Default.html +1 -1
  17. data/doc/Compony/ComponentMixins/Resourceful.html +2 -2
  18. data/doc/Compony/ComponentMixins.html +1 -1
  19. data/doc/Compony/Components/Button.html +2 -2
  20. data/doc/Compony/Components/Buttons/CssButton.html +282 -0
  21. data/doc/Compony/Components/Buttons/Link.html +252 -0
  22. data/doc/Compony/Components/Buttons.html +126 -0
  23. data/doc/Compony/Components/Destroy.html +11 -11
  24. data/doc/Compony/Components/Edit.html +14 -14
  25. data/doc/Compony/Components/Form.html +100 -100
  26. data/doc/Compony/Components/Index.html +2 -2
  27. data/doc/Compony/Components/List.html +3 -3
  28. data/doc/Compony/Components/New.html +2 -2
  29. data/doc/Compony/Components/Show.html +24 -24
  30. data/doc/Compony/Components/WithForm.html +3 -3
  31. data/doc/Compony/Components.html +5 -3
  32. data/doc/Compony/ControllerMixin.html +2 -2
  33. data/doc/Compony/Engine.html +1 -1
  34. data/doc/Compony/ExposedIntentsDsl.html +403 -0
  35. data/doc/Compony/Intent.html +1503 -0
  36. data/doc/Compony/MethodAccessibleHash.html +1 -1
  37. data/doc/Compony/ModelFields/Anchormodel.html +1 -1
  38. data/doc/Compony/ModelFields/Association.html +2 -2
  39. data/doc/Compony/ModelFields/Attachment.html +1 -1
  40. data/doc/Compony/ModelFields/Base.html +1 -1
  41. data/doc/Compony/ModelFields/Boolean.html +1 -1
  42. data/doc/Compony/ModelFields/Color.html +1 -1
  43. data/doc/Compony/ModelFields/Currency.html +1 -1
  44. data/doc/Compony/ModelFields/Date.html +1 -1
  45. data/doc/Compony/ModelFields/Datetime.html +1 -1
  46. data/doc/Compony/ModelFields/Decimal.html +1 -1
  47. data/doc/Compony/ModelFields/Email.html +1 -1
  48. data/doc/Compony/ModelFields/Float.html +1 -1
  49. data/doc/Compony/ModelFields/Integer.html +1 -1
  50. data/doc/Compony/ModelFields/Percentage.html +1 -1
  51. data/doc/Compony/ModelFields/Phone.html +1 -1
  52. data/doc/Compony/ModelFields/RichText.html +1 -1
  53. data/doc/Compony/ModelFields/String.html +1 -1
  54. data/doc/Compony/ModelFields/Text.html +1 -1
  55. data/doc/Compony/ModelFields/Time.html +1 -1
  56. data/doc/Compony/ModelFields/Url.html +1 -1
  57. data/doc/Compony/ModelFields.html +1 -1
  58. data/doc/Compony/ModelMixin.html +1 -1
  59. data/doc/Compony/NaturalOrdering.html +1 -1
  60. data/doc/Compony/RequestContext.html +177 -14
  61. data/doc/Compony/Version.html +1 -1
  62. data/doc/Compony/ViewHelpers.html +15 -272
  63. data/doc/Compony/VirtualModel.html +1 -1
  64. data/doc/Compony.html +303 -837
  65. data/doc/ComponyController.html +1 -1
  66. data/doc/_index.html +30 -2
  67. data/doc/class_list.html +1 -1
  68. data/doc/file.README.html +11 -18
  69. data/doc/guide/basic_component.md +12 -8
  70. data/doc/guide/example.md +17 -17
  71. data/doc/guide/feasibility.md +4 -2
  72. data/doc/guide/generators.md +4 -2
  73. data/doc/guide/inheritance.md +4 -2
  74. data/doc/guide/installation.md +4 -2
  75. data/doc/guide/intents.md +167 -0
  76. data/doc/guide/internal_datastructures.md +4 -2
  77. data/doc/guide/model_fields.md +4 -2
  78. data/doc/guide/nesting.md +5 -3
  79. data/doc/guide/ownership.md +5 -3
  80. data/doc/guide/pre_built_components/destroy.md +3 -3
  81. data/doc/guide/pre_built_components/edit.md +1 -1
  82. data/doc/guide/pre_built_components/form.md +1 -1
  83. data/doc/guide/pre_built_components/index.md +1 -1
  84. data/doc/guide/pre_built_components/list.md +1 -1
  85. data/doc/guide/pre_built_components/new.md +2 -2
  86. data/doc/guide/pre_built_components/show.md +1 -1
  87. data/doc/guide/pre_built_components/with_form.md +1 -1
  88. data/doc/guide/pre_built_components.md +4 -3
  89. data/doc/guide/resourceful.md +5 -3
  90. data/doc/guide/standalone.md +10 -2
  91. data/doc/guide/virtual_models.md +4 -2
  92. data/doc/index.html +11 -18
  93. data/doc/method_list.html +273 -161
  94. data/doc/top-level-namespace.html +1 -1
  95. data/lib/compony/component.rb +19 -48
  96. data/lib/compony/component_mixins/default/standalone/standalone_dsl.rb +2 -2
  97. data/lib/compony/component_mixins/default/standalone.rb +16 -0
  98. data/lib/compony/component_mixins/resourceful.rb +1 -1
  99. data/lib/compony/components/buttons/css_button.rb +32 -0
  100. data/lib/compony/components/buttons/link.rb +31 -0
  101. data/lib/compony/components/destroy.rb +9 -8
  102. data/lib/compony/components/edit.rb +5 -4
  103. data/lib/compony/components/form.rb +7 -1
  104. data/lib/compony/components/index.rb +2 -2
  105. data/lib/compony/components/list.rb +4 -4
  106. data/lib/compony/components/new.rb +1 -1
  107. data/lib/compony/components/show.rb +8 -11
  108. data/lib/compony/components/with_form.rb +1 -1
  109. data/lib/compony/exposed_intents_dsl.rb +29 -0
  110. data/lib/compony/intent.rb +145 -0
  111. data/lib/compony/model_fields/association.rb +1 -1
  112. data/lib/compony/request_context.rb +21 -0
  113. data/lib/compony/view_helpers.rb +5 -48
  114. data/lib/compony.rb +63 -149
  115. metadata +12 -6
  116. data/doc/guide/helpers.md +0 -156
  117. data/doc/guide/pre_built_components/button.md +0 -8
  118. data/doc/guide/root_actions.md +0 -67
  119. data/lib/compony/components/button.rb +0 -61
@@ -396,7 +396,7 @@
396
396
  </div>
397
397
 
398
398
  <div id="footer">
399
- Generated on Thu Nov 20 12:44:24 2025 by
399
+ Generated on Thu Nov 27 16:02:22 2025 by
400
400
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
401
401
  0.9.34 (ruby-3.3.5).
402
402
  </div>
@@ -529,7 +529,7 @@
529
529
  </div>
530
530
 
531
531
  <div id="footer">
532
- Generated on Thu Nov 20 12:44:25 2025 by
532
+ Generated on Thu Nov 27 16:02:23 2025 by
533
533
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
534
534
  0.9.34 (ruby-3.3.5).
535
535
  </div>
@@ -550,8 +550,8 @@
550
550
  <span class='label'>scope:</span> <span class='ivar'>@scope</span><span class='comma'>,</span>
551
551
  <span class='label'>scope_args:</span> <span class='ivar'>@scope_args</span><span class='comma'>,</span>
552
552
  <span class='label'>verbs:</span> <span class='ivar'>@verbs</span><span class='comma'>,</span>
553
- <span class='label'>rails_action_name:</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_rails_action_name'><span class='object_link'><a href="../../../../Compony.html#rails_action_name-class_method" title="Compony.rails_action_name (method)">rails_action_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='comma'>,</span> <span class='ivar'>@name</span><span class='rparen'>)</span><span class='comma'>,</span>
554
- <span class='label'>path_helper_name:</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='comma'>,</span> <span class='ivar'>@name</span><span class='rparen'>)</span><span class='comma'>,</span>
553
+ <span class='label'>rails_action_name:</span> <span class='id identifier rubyid_rails_action_name'>rails_action_name</span><span class='lparen'>(</span><span class='ivar'>@name</span><span class='rparen'>)</span><span class='comma'>,</span>
554
+ <span class='label'>path_helper_name:</span> <span class='id identifier rubyid_path_helper_name'>path_helper_name</span><span class='lparen'>(</span><span class='ivar'>@name</span><span class='rparen'>)</span><span class='comma'>,</span>
555
555
  <span class='label'>skip_authentication:</span> <span class='ivar'>@skip_authentication</span><span class='comma'>,</span>
556
556
  <span class='label'>skip_forgery_protection:</span> <span class='ivar'>@skip_forgery_protection</span><span class='comma'>,</span>
557
557
  <span class='label'>layout:</span> <span class='ivar'>@layout</span>
@@ -659,7 +659,7 @@
659
659
  </div>
660
660
 
661
661
  <div id="footer">
662
- Generated on Thu Nov 20 12:44:25 2025 by
662
+ Generated on Thu Nov 27 16:02:23 2025 by
663
663
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
664
664
  0.9.34 (ruby-3.3.5).
665
665
  </div>
@@ -567,7 +567,7 @@
567
567
  </div>
568
568
 
569
569
  <div id="footer">
570
- Generated on Thu Nov 20 12:44:25 2025 by
570
+ Generated on Thu Nov 27 16:02:23 2025 by
571
571
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
572
572
  0.9.34 (ruby-3.3.5).
573
573
  </div>
@@ -171,6 +171,54 @@
171
171
  <p>Called by compony_controller when a request is issued.</p>
172
172
  </div></span>
173
173
 
174
+ </li>
175
+
176
+
177
+ <li class="protected ">
178
+ <span class="summary_signature">
179
+
180
+ <a href="#path_helper_name-instance_method" title="#path_helper_name (instance method)">#<strong>path_helper_name</strong> &#x21d2; Object </a>
181
+
182
+
183
+
184
+ </span>
185
+
186
+
187
+
188
+ <span class="note title protected">protected</span>
189
+
190
+
191
+
192
+
193
+
194
+ <span class="summary_desc"><div class='inline'>
195
+ <p>Returns the name of the Rails URL helper returning the path to this component.<br> Optionally can pass a name for extra standalone configs.</p>
196
+ </div></span>
197
+
198
+ </li>
199
+
200
+
201
+ <li class="protected ">
202
+ <span class="summary_signature">
203
+
204
+ <a href="#rails_action_name-instance_method" title="#rails_action_name (instance method)">#<strong>rails_action_name</strong>(name = nil) &#x21d2; Object </a>
205
+
206
+
207
+
208
+ </span>
209
+
210
+
211
+
212
+ <span class="note title protected">protected</span>
213
+
214
+
215
+
216
+
217
+
218
+ <span class="summary_desc"><div class='inline'>
219
+ <p>Returns the name of the ComponyController action for this component.<br> Optionally can pass a name for extra standalone configs.</p>
220
+ </div></span>
221
+
174
222
  </li>
175
223
 
176
224
 
@@ -473,6 +521,144 @@
473
521
  </td>
474
522
  </tr>
475
523
  </table>
524
+ </div>
525
+
526
+ <div class="method_details ">
527
+ <h3 class="signature " id="path_helper_name-instance_method">
528
+
529
+ #<strong>path_helper_name</strong> &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
530
+
531
+
532
+
533
+
534
+
535
+ </h3><div class="docstring">
536
+ <div class="discussion">
537
+
538
+ <p>Returns the name of the Rails URL helper returning the path to this component.<br> Optionally can pass a name for extra standalone configs.</p>
539
+
540
+
541
+ </div>
542
+ </div>
543
+ <div class="tags">
544
+ <p class="tag_title">Parameters:</p>
545
+ <ul class="param">
546
+
547
+ <li>
548
+
549
+ <span class='name'>name</span>
550
+
551
+
552
+ <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
553
+
554
+
555
+
556
+ &mdash;
557
+ <div class='inline'>
558
+ <p>If referring to an extra standalone entrypoint, specify its name using this param.</p>
559
+ </div>
560
+
561
+ </li>
562
+
563
+ </ul>
564
+
565
+
566
+ <p class="tag_title">See Also:</p>
567
+ <ul class="see">
568
+
569
+ <li>Compony#path</li>
570
+
571
+ </ul>
572
+
573
+ </div><table class="source_code">
574
+ <tr>
575
+ <td>
576
+ <pre class="lines">
577
+
578
+
579
+ 138
580
+ 139
581
+ 140</pre>
582
+ </td>
583
+ <td>
584
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone.rb', line 138</span>
585
+
586
+ <span class='kw'>def</span> <span class='id identifier rubyid_path_helper_name'>path_helper_name</span><span class='lparen'>(</span><span class='op'>...</span><span class='rparen'>)</span>
587
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_rails_action_name'>rails_action_name</span><span class='lparen'>(</span><span class='op'>...</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>_comp</span><span class='tstring_end'>&quot;</span></span>
588
+ <span class='kw'>end</span></pre>
589
+ </td>
590
+ </tr>
591
+ </table>
592
+ </div>
593
+
594
+ <div class="method_details ">
595
+ <h3 class="signature " id="rails_action_name-instance_method">
596
+
597
+ #<strong>rails_action_name</strong>(name = nil) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
598
+
599
+
600
+
601
+
602
+
603
+ </h3><div class="docstring">
604
+ <div class="discussion">
605
+
606
+ <p>Returns the name of the ComponyController action for this component.<br> Optionally can pass a name for extra standalone configs.</p>
607
+
608
+
609
+ </div>
610
+ </div>
611
+ <div class="tags">
612
+ <p class="tag_title">Parameters:</p>
613
+ <ul class="param">
614
+
615
+ <li>
616
+
617
+ <span class='name'>name</span>
618
+
619
+
620
+ <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
621
+
622
+
623
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
624
+
625
+
626
+ &mdash;
627
+ <div class='inline'>
628
+ <p>If referring to an extra standalone entrypoint, specify its name using this param.</p>
629
+ </div>
630
+
631
+ </li>
632
+
633
+ </ul>
634
+
635
+
636
+ <p class="tag_title">See Also:</p>
637
+ <ul class="see">
638
+
639
+ <li>Compony#path</li>
640
+
641
+ </ul>
642
+
643
+ </div><table class="source_code">
644
+ <tr>
645
+ <td>
646
+ <pre class="lines">
647
+
648
+
649
+ 130
650
+ 131
651
+ 132</pre>
652
+ </td>
653
+ <td>
654
+ <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone.rb', line 130</span>
655
+
656
+ <span class='kw'>def</span> <span class='id identifier rubyid_rails_action_name'>rails_action_name</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
657
+ <span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_presence'>presence</span><span class='comma'>,</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='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>_</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
658
+ <span class='kw'>end</span></pre>
659
+ </td>
660
+ </tr>
661
+ </table>
476
662
  </div>
477
663
 
478
664
  <div class="method_details ">
@@ -682,7 +868,7 @@
682
868
  </div>
683
869
 
684
870
  <div id="footer">
685
- Generated on Thu Nov 20 12:44:24 2025 by
871
+ Generated on Thu Nov 27 16:02:22 2025 by
686
872
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
687
873
  0.9.34 (ruby-3.3.5).
688
874
  </div>
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Thu Nov 20 12:44:23 2025 by
119
+ Generated on Thu Nov 27 16:02:22 2025 by
120
120
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
121
  0.9.34 (ruby-3.3.5).
122
122
  </div>
@@ -927,7 +927,7 @@
927
927
  <pre class="code"><span class="info file"># File 'lib/compony/component_mixins/resourceful.rb', line 30</span>
928
928
 
929
929
  <span class='kw'>def</span> <span class='id identifier rubyid_data_class'>data_class</span><span class='lparen'>(</span><span class='id identifier rubyid_new_data_class'>new_data_class</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
930
- <span class='ivar'>@data_class</span> <span class='op'>||=</span> <span class='id identifier rubyid_new_data_class'>new_data_class</span> <span class='op'>||</span> <span class='id identifier rubyid_family_cst'>family_cst</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_singularize'>singularize</span><span class='period'>.</span><span class='id identifier rubyid_constantize'>constantize</span>
930
+ <span class='ivar'>@data_class</span> <span class='op'>||=</span> <span class='id identifier rubyid_new_data_class'>new_data_class</span> <span class='op'>||</span> <span class='id identifier rubyid_family_name'>family_name</span><span class='period'>.</span><span class='id identifier rubyid_singularize'>singularize</span><span class='period'>.</span><span class='id identifier rubyid_camelize'>camelize</span><span class='period'>.</span><span class='id identifier rubyid_constantize'>constantize</span>
931
931
  <span class='kw'>end</span></pre>
932
932
  </td>
933
933
  </tr>
@@ -1183,7 +1183,7 @@
1183
1183
  </div>
1184
1184
 
1185
1185
  <div id="footer">
1186
- Generated on Thu Nov 20 12:44:23 2025 by
1186
+ Generated on Thu Nov 27 16:02:22 2025 by
1187
1187
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1188
1188
  0.9.34 (ruby-3.3.5).
1189
1189
  </div>
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Thu Nov 20 12:44:23 2025 by
119
+ Generated on Thu Nov 27 16:02:22 2025 by
120
120
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
121
  0.9.34 (ruby-3.3.5).
122
122
  </div>
@@ -196,7 +196,7 @@
196
196
 
197
197
 
198
198
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Component.html" title="Compony::Component (class)">Compony::Component</a></span></h3>
199
- <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#before_render-instance_method" title="Compony::Component#before_render (method)">#before_render</a></span>, <span class='object_link'><a href="../Component.html#comp_cst-class_method" title="Compony::Component.comp_cst (method)">comp_cst</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#family_cst-class_method" title="Compony::Component.family_cst (method)">family_cst</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#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>
199
+ <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#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#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#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>
200
200
  <div id="constructor_details" class="method_details_list">
201
201
  <h2>Constructor Details</h2>
202
202
 
@@ -287,7 +287,7 @@
287
287
  </div>
288
288
 
289
289
  <div id="footer">
290
- Generated on Thu Nov 20 12:44:24 2025 by
290
+ Generated on Fri Nov 21 15:29:21 2025 by
291
291
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
292
292
  0.9.34 (ruby-3.3.5).
293
293
  </div>
@@ -0,0 +1,282 @@
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::Buttons::CssButton
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::Buttons::CssButton";
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> &raquo; <span class='title'><span class='object_link'><a href="../../Components.html" title="Compony::Components (module)">Components</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Buttons.html" title="Compony::Components::Buttons (module)">Buttons</a></span></span>
41
+ &raquo;
42
+ <span class="title">CssButton</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::Buttons::CssButton
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="Link.html" title="Compony::Components::Buttons::Link (class)">Link</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"><span class='object_link'><a href="Link.html" title="Compony::Components::Buttons::Link (class)">Link</a></span></li>
80
+
81
+ <li class="next">Compony::Components::Buttons::CssButton</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>lib/compony/components/buttons/css_button.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+ <div class="docstring">
107
+ <div class="discussion">
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+ <h2>Instance Attribute Summary</h2>
122
+
123
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../../Component.html" title="Compony::Component (class)">Compony::Component</a></span></h3>
124
+ <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#content_blocks-instance_method" title="Compony::Component#content_blocks (method)">#content_blocks</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>
125
+
126
+
127
+
128
+ <h2>
129
+ Instance Method Summary
130
+ <small><a href="#" class="summary_toggle">collapse</a></small>
131
+ </h2>
132
+
133
+ <ul class="summary">
134
+
135
+ <li class="public ">
136
+ <span class="summary_signature">
137
+
138
+ <a href="#prepare_opts!-instance_method" title="#prepare_opts! (instance method)">#<strong>prepare_opts!</strong> &#x21d2; Object </a>
139
+
140
+
141
+
142
+ </span>
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <span class="summary_desc"><div class='inline'></div></span>
153
+
154
+ </li>
155
+
156
+
157
+ </ul>
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../../Component.html" title="Compony::Component (class)">Compony::Component</a></span></h3>
176
+ <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#initialize-instance_method" title="Compony::Component#initialize (method)">#initialize</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>
177
+ <div id="constructor_details" class="method_details_list">
178
+ <h2>Constructor Details</h2>
179
+
180
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="../../Component.html#initialize-instance_method" title="Compony::Component#initialize (method)">Compony::Component</a></span></p>
181
+
182
+ </div>
183
+
184
+
185
+ <div id="instance_method_details" class="method_details_list">
186
+ <h2>Instance Method Details</h2>
187
+
188
+
189
+ <div class="method_details first">
190
+ <h3 class="signature first" id="prepare_opts!-instance_method">
191
+
192
+ #<strong>prepare_opts!</strong> &#x21d2; <tt>Object</tt>
193
+
194
+
195
+
196
+
197
+
198
+ </h3><div class="docstring">
199
+ <div class="discussion">
200
+
201
+
202
+ </div>
203
+ </div>
204
+ <div class="tags">
205
+
206
+
207
+ </div><table class="source_code">
208
+ <tr>
209
+ <td>
210
+ <pre class="lines">
211
+
212
+
213
+ 5
214
+ 6
215
+ 7
216
+ 8
217
+ 9
218
+ 10
219
+ 11
220
+ 12
221
+ 13
222
+ 14
223
+ 15
224
+ 16
225
+ 17
226
+ 18
227
+ 19
228
+ 20
229
+ 21
230
+ 22
231
+ 23
232
+ 24
233
+ 25
234
+ 26
235
+ 27
236
+ 28</pre>
237
+ </td>
238
+ <td>
239
+ <pre class="code"><span class="info file"># File 'lib/compony/components/buttons/css_button.rb', line 5</span>
240
+
241
+ <span class='kw'>def</span> <span class='id identifier rubyid_prepare_opts!'>prepare_opts!</span>
242
+ <span class='kw'>super</span>
243
+ <span class='id identifier rubyid_css'>css</span> <span class='op'>=</span> <span class='lbracket'>[</span>
244
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>display:inline-block</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
245
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>padding:.15rem .35rem</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
246
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>text-decoration:none</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
247
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>border-radius:6px</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
248
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>font-size: 13.333px</span><span class='tstring_end'>&#39;</span></span>
249
+ <span class='rbracket'>]</span>
250
+ <span class='kw'>if</span> <span class='ivar'>@comp_opts</span><span class='lbracket'>[</span><span class='symbol'>:class</span><span class='rbracket'>]</span><span class='op'>&amp;.</span><span class='id identifier rubyid_split'>split</span><span class='op'>&amp;.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>disabled</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
251
+ <span class='id identifier rubyid_css'>css</span> <span class='op'>+=</span> <span class='lbracket'>[</span>
252
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>background:#e9ecef</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
253
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>color:#6c757d</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
254
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>cursor: default</span><span class='tstring_end'>&#39;</span></span>
255
+ <span class='rbracket'>]</span>
256
+ <span class='kw'>else</span>
257
+ <span class='id identifier rubyid_css'>css</span> <span class='op'>+=</span> <span class='lbracket'>[</span>
258
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>background:#eaeaee</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
259
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>color:#000000</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
260
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>border:1px solid #90909e</span><span class='tstring_end'>&#39;</span></span>
261
+ <span class='rbracket'>]</span>
262
+ <span class='kw'>end</span>
263
+ <span class='ivar'>@comp_opts</span><span class='lbracket'>[</span><span class='symbol'>:style</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_css'>css</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>;</span><span class='tstring_end'>&quot;</span></span>
264
+ <span class='kw'>end</span></pre>
265
+ </td>
266
+ </tr>
267
+ </table>
268
+ </div>
269
+
270
+ </div>
271
+
272
+ </div>
273
+
274
+ <div id="footer">
275
+ Generated on Thu Nov 27 16:02:23 2025 by
276
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
277
+ 0.9.34 (ruby-3.3.5).
278
+ </div>
279
+
280
+ </div>
281
+ </body>
282
+ </html>