Class: UI::TableCellComponent

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
TableCellBehavior
Defined in:
app/view_components/ui/table_cell_component.rb

Instance Method Summary collapse

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

#callObject



11
12
13
# File 'app/view_components/ui/table_cell_component.rb', line 11

def call
   :td, content, **cell_html_attributes.deep_merge(@attributes)
end