Class: Brainzlab::Components::Table

Inherits:
Base
  • Object
show all
Defined in:
lib/brainzlab/components/table.rb

Instance Method Summary collapse

Methods inherited from Base

#classes

Constructor Details

#initialize(**attrs) ⇒ Table

Returns a new instance of Table.



6
7
8
# File 'lib/brainzlab/components/table.rb', line 6

def initialize(**attrs)
  @attrs = attrs
end

Instance Method Details

#view_templateObject



10
11
12
13
14
# File 'lib/brainzlab/components/table.rb', line 10

def view_template(&)
  div(class: 'table-wrapper') do
    table(class: classes('table', @attrs[:class]), **@attrs.except(:class), &)
  end
end