class TaoUi::Components::Table::TableBuilder

Public Instance Methods

body(body_options = {}) click to toggle source
# File lib/tao_ui/components/table/table_builder.rb, line 16
def body body_options = {}, &block
  body_content = view.capture(body_builder, &block)
  view.content_tag 'tbody', body_content, body_options
end
head(head_options = {}) click to toggle source
# 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.content_tag 'thead', head_options do
    view.content_tag 'tr', head_content
  end
end

Private Instance Methods

body_builder() click to toggle source
# File lib/tao_ui/components/table/table_builder.rb, line 27
def body_builder
  @body_builder ||= BodyBuilder.new(view, options)
end
head_builder() click to toggle source
# File lib/tao_ui/components/table/table_builder.rb, line 23
def head_builder
  @head_builder ||= HeadBuilder.new(view, options)
end