Class: UI::TableCellComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::TableCellComponent
- Includes:
- TableCellBehavior
- Defined in:
- app/view_components/ui/table_cell_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ TableCellComponent
constructor
A new instance of TableCellComponent.
Methods included from TableCellBehavior
#cell_classes, #cell_html_attributes, #render_cell
Constructor Details
#initialize(classes: "", **attributes) ⇒ TableCellComponent
Returns a new instance of TableCellComponent.
6 7 8 9 |
# File 'app/view_components/ui/table_cell_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_cell_component.rb', line 11 def call content_tag :td, content, **cell_html_attributes.deep_merge(@attributes) end |