Class: LesliView::Elements::Table::TableRow

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
lib/lesli_view/elements/table.rb

Defined Under Namespace

Classes: TableData

Instance Method Summary collapse

Constructor Details

#initialize(css_class: "") ⇒ TableRow

Returns a new instance of TableRow.



62
63
64
# File 'lib/lesli_view/elements/table.rb', line 62

def initialize(css_class: "")
    @css_class = css_class
end

Instance Method Details

#callObject



66
67
68
69
# File 'lib/lesli_view/elements/table.rb', line 66

def call
    # safe_joins ensure multiple <td> elements render correctly
    (:tr, safe_join(cells), class:@css_class)
end