class Voom::Presenters::DSL::Components::Table

Attributes

border[RW]
header[RW]
rows[RW]
selectable[RW]
width[RW]

Public Class Methods

new(**attribs_, &block) click to toggle source
# File lib/voom/presenters/dsl/components/table.rb, line 10
def initialize(**attribs_, &block)
  super(type: :table, **attribs_, &block)
  @selectable = attribs.delete(:selectable)
  @border = attribs.delete(:border){ true }
  @width = attribs.delete(:width)
  @rows = []
  expand!
end

Public Instance Methods

pagination(**attribs, &block) click to toggle source
# File lib/voom/presenters/dsl/components/table.rb, line 36
def pagination(**attribs, &block)
  return @pagination if locked?
  @pagination = Pagination.new(parent: self,
                               **attribs, &block)
end
row(**attribs, &block) click to toggle source
# File lib/voom/presenters/dsl/components/table.rb, line 31
def row(**attribs, &block)
  @rows << Row.new(parent: self, type: :row,
                   **attribs, &block)
end