Class: UI::TableCell
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::TableCell
- Includes:
- TableCellBehavior
- Defined in:
- app/components/ui/table_cell.rb
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ TableCell
constructor
A new instance of TableCell.
- #view_template(&block) ⇒ Object
Methods included from TableCellBehavior
#cell_classes, #cell_html_attributes, #render_cell
Constructor Details
#initialize(classes: "", **attributes) ⇒ TableCell
Returns a new instance of TableCell.
6 7 8 9 |
# File 'app/components/ui/table_cell.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_cell.rb', line 11 def view_template(&block) td(**cell_html_attributes.deep_merge(@attributes)) do yield if block_given? end end |