Class: TaoUi::Components::Table::TableBuilder

Inherits:
BaseBuilder
  • Object
show all
Defined in:
lib/tao_ui/components/table/table_builder.rb

Instance Attribute Summary

Attributes inherited from BaseBuilder

#expandable, #options, #selectable, #view

Instance Method Summary collapse

Methods inherited from BaseBuilder

#initialize, #merge_options

Constructor Details

This class inherits a constructor from TaoUi::Components::Table::BaseBuilder

Instance Method Details

#body(body_options = {}, &block) ⇒ Object



16
17
18
19
# File 'lib/tao_ui/components/table/table_builder.rb', line 16

def body body_options = {}, &block
  body_content = view.capture(body_builder, &block)
  view. 'tbody', body_content, body_options
end

#head(head_options = {}, &block) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/tao_ui/components/table/table_builder.rb', line 7

def head head_options = {}, &block
  head_content = view.capture(head_builder, &block)
  head_content = selectable_th + head_content if selectable
  head_content = expandable_th + head_content if expandable
  view. 'thead', head_options do
    view. 'tr', head_content
  end
end