Class: StimulusPlumbers::Components::ActionList::Section
- Inherits:
-
Plumber::Base
- Object
- Plumber::Base
- StimulusPlumbers::Components::ActionList::Section
- Defined in:
- lib/stimulus_plumbers/components/action_list/section.rb
Constant Summary
Constants included from Plumber::HtmlOptions
Plumber::HtmlOptions::STIMULUS_SPACEJOIN_KEYS
Instance Attribute Summary
Attributes inherited from Plumber::Base
Instance Method Summary collapse
Methods inherited from Plumber::Base
Methods included from Plumber::HtmlOptions
#merge_data_options, #merge_html_options, #merge_string_option, #normalize_part
Constructor Details
This class inherits a constructor from StimulusPlumbers::Plumber::Base
Instance Method Details
#render(title: nil, **kwargs, &block) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/stimulus_plumbers/components/action_list/section.rb', line 7 def render(title: nil, **kwargs, &block) = (kwargs) template.content_tag(:div, **) do template.safe_join( [ (template.content_tag(:p, title) if title.present?), template.content_tag(:ul, template.capture(&block)) ].compact ) end end |