Class: FoxTail::Table::RowComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/fox_tail/table/row_component.rb

Instance Method Summary collapse

Instance Method Details

#before_renderObject



19
20
21
22
23
# File 'app/components/fox_tail/table/row_component.rb', line 19

def before_render
  super

  html_attributes[:class] = classnames theme.apply(:root, self), html_class
end

#callObject



25
26
27
28
29
# File 'app/components/fox_tail/table/row_component.rb', line 25

def call
   :tr, html_attributes do
    columns.each { |column| concat column }
  end
end

#even?Boolean



15
16
17
# File 'app/components/fox_tail/table/row_component.rb', line 15

def even?
  position.is_a?(Numeric) && position.even?
end