Class: UI::TableCaption
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::TableCaption
- Includes:
- TableCaptionBehavior
- Defined in:
- app/components/ui/table_caption.rb
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ TableCaption
constructor
A new instance of TableCaption.
- #view_template(&block) ⇒ Object
Methods included from TableCaptionBehavior
#caption_classes, #caption_html_attributes, #render_caption
Constructor Details
#initialize(classes: "", **attributes) ⇒ TableCaption
Returns a new instance of TableCaption.
6 7 8 9 |
# File 'app/components/ui/table_caption.rb', line 6 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
11 12 13 14 15 |
# File 'app/components/ui/table_caption.rb', line 11 def view_template(&block) caption(**caption_html_attributes.deep_merge(@attributes)) do yield if block_given? end end |