Class: UI::TableCaptionComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::TableCaptionComponent
- Includes:
- TableCaptionBehavior
- Defined in:
- app/view_components/ui/table_caption_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ TableCaptionComponent
constructor
A new instance of TableCaptionComponent.
Methods included from TableCaptionBehavior
#caption_classes, #caption_html_attributes, #render_caption
Constructor Details
#initialize(classes: "", **attributes) ⇒ TableCaptionComponent
Returns a new instance of TableCaptionComponent.
6 7 8 9 |
# File 'app/view_components/ui/table_caption_component.rb', line 6 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
11 12 13 |
# File 'app/view_components/ui/table_caption_component.rb', line 11 def call content_tag :caption, content, **caption_html_attributes.deep_merge(@attributes) end |